1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package gamesmanagement provides access to the Google Play Game Management.
8//
9// For product documentation, see: https://developers.google.com/games/
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/gamesmanagement/v1management"
16//   ...
17//   ctx := context.Background()
18//   gamesmanagementService, err := gamesmanagement.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   gamesmanagementService, err := gamesmanagement.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   gamesmanagementService, err := gamesmanagement.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package gamesmanagement // import "google.golang.org/api/gamesmanagement/v1management"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	internaloption "google.golang.org/api/option/internaloption"
56	htransport "google.golang.org/api/transport/http"
57)
58
59// Always reference these packages, just in case the auto-generated code
60// below doesn't.
61var _ = bytes.NewBuffer
62var _ = strconv.Itoa
63var _ = fmt.Sprintf
64var _ = json.NewDecoder
65var _ = io.Copy
66var _ = url.Parse
67var _ = gensupport.MarshalJSON
68var _ = googleapi.Version
69var _ = errors.New
70var _ = strings.Replace
71var _ = context.Canceled
72var _ = internaloption.WithDefaultEndpoint
73
74const apiId = "gamesManagement:v1management"
75const apiName = "gamesManagement"
76const apiVersion = "v1management"
77const basePath = "https://gamesmanagement.googleapis.com/"
78const mtlsBasePath = "https://gamesmanagement.mtls.googleapis.com/"
79
80// OAuth2 scopes used by this API.
81const (
82	// Create, edit, and delete your Google Play Games activity
83	GamesScope = "https://www.googleapis.com/auth/games"
84)
85
86// NewService creates a new Service.
87func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
88	scopesOption := option.WithScopes(
89		"https://www.googleapis.com/auth/games",
90	)
91	// NOTE: prepend, so we don't override user-specified scopes.
92	opts = append([]option.ClientOption{scopesOption}, opts...)
93	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
94	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Achievements = NewAchievementsService(s)
120	s.Applications = NewApplicationsService(s)
121	s.Events = NewEventsService(s)
122	s.Players = NewPlayersService(s)
123	s.Scores = NewScoresService(s)
124	return s, nil
125}
126
127type Service struct {
128	client    *http.Client
129	BasePath  string // API endpoint base URL
130	UserAgent string // optional additional User-Agent fragment
131
132	Achievements *AchievementsService
133
134	Applications *ApplicationsService
135
136	Events *EventsService
137
138	Players *PlayersService
139
140	Scores *ScoresService
141}
142
143func (s *Service) userAgent() string {
144	if s.UserAgent == "" {
145		return googleapi.UserAgent
146	}
147	return googleapi.UserAgent + " " + s.UserAgent
148}
149
150func NewAchievementsService(s *Service) *AchievementsService {
151	rs := &AchievementsService{s: s}
152	return rs
153}
154
155type AchievementsService struct {
156	s *Service
157}
158
159func NewApplicationsService(s *Service) *ApplicationsService {
160	rs := &ApplicationsService{s: s}
161	return rs
162}
163
164type ApplicationsService struct {
165	s *Service
166}
167
168func NewEventsService(s *Service) *EventsService {
169	rs := &EventsService{s: s}
170	return rs
171}
172
173type EventsService struct {
174	s *Service
175}
176
177func NewPlayersService(s *Service) *PlayersService {
178	rs := &PlayersService{s: s}
179	return rs
180}
181
182type PlayersService struct {
183	s *Service
184}
185
186func NewScoresService(s *Service) *ScoresService {
187	rs := &ScoresService{s: s}
188	return rs
189}
190
191type ScoresService struct {
192	s *Service
193}
194
195// AchievementResetAllResponse: Achievement reset all response.
196type AchievementResetAllResponse struct {
197	// Kind: Uniquely identifies the type of this resource. Value is always
198	// the fixed string `gamesManagement#achievementResetAllResponse`.
199	Kind string `json:"kind,omitempty"`
200
201	// Results: The achievement reset results.
202	Results []*AchievementResetResponse `json:"results,omitempty"`
203
204	// ServerResponse contains the HTTP response code and headers from the
205	// server.
206	googleapi.ServerResponse `json:"-"`
207
208	// ForceSendFields is a list of field names (e.g. "Kind") to
209	// unconditionally include in API requests. By default, fields with
210	// empty values are omitted from API requests. However, any non-pointer,
211	// non-interface field appearing in ForceSendFields will be sent to the
212	// server regardless of whether the field is empty or not. This may be
213	// used to include empty fields in Patch requests.
214	ForceSendFields []string `json:"-"`
215
216	// NullFields is a list of field names (e.g. "Kind") to include in API
217	// requests with the JSON null value. By default, fields with empty
218	// values are omitted from API requests. However, any field with an
219	// empty value appearing in NullFields will be sent to the server as
220	// null. It is an error if a field in this list has a non-empty value.
221	// This may be used to include null fields in Patch requests.
222	NullFields []string `json:"-"`
223}
224
225func (s *AchievementResetAllResponse) MarshalJSON() ([]byte, error) {
226	type NoMethod AchievementResetAllResponse
227	raw := NoMethod(*s)
228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
229}
230
231type AchievementResetMultipleForAllRequest struct {
232	// AchievementIds: The IDs of achievements to reset.
233	AchievementIds []string `json:"achievement_ids,omitempty"`
234
235	// Kind: Uniquely identifies the type of this resource. Value is always
236	// the fixed string
237	// `gamesManagement#achievementResetMultipleForAllRequest`.
238	Kind string `json:"kind,omitempty"`
239
240	// ForceSendFields is a list of field names (e.g. "AchievementIds") to
241	// unconditionally include in API requests. By default, fields with
242	// empty values are omitted from API requests. However, any non-pointer,
243	// non-interface field appearing in ForceSendFields will be sent to the
244	// server regardless of whether the field is empty or not. This may be
245	// used to include empty fields in Patch requests.
246	ForceSendFields []string `json:"-"`
247
248	// NullFields is a list of field names (e.g. "AchievementIds") to
249	// include in API requests with the JSON null value. By default, fields
250	// with empty values are omitted from API requests. However, any field
251	// with an empty value appearing in NullFields will be sent to the
252	// server as null. It is an error if a field in this list has a
253	// non-empty value. This may be used to include null fields in Patch
254	// requests.
255	NullFields []string `json:"-"`
256}
257
258func (s *AchievementResetMultipleForAllRequest) MarshalJSON() ([]byte, error) {
259	type NoMethod AchievementResetMultipleForAllRequest
260	raw := NoMethod(*s)
261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
262}
263
264// AchievementResetResponse: An achievement reset response.
265type AchievementResetResponse struct {
266	// CurrentState: The current state of the achievement. This is the same
267	// as the initial state of the achievement. Possible values are: -
268	// "HIDDEN"- Achievement is hidden. - "REVEALED" - Achievement is
269	// revealed. - "UNLOCKED" - Achievement is unlocked.
270	CurrentState string `json:"currentState,omitempty"`
271
272	// DefinitionId: The ID of an achievement for which player state has
273	// been updated.
274	DefinitionId string `json:"definitionId,omitempty"`
275
276	// Kind: Uniquely identifies the type of this resource. Value is always
277	// the fixed string `gamesManagement#achievementResetResponse`.
278	Kind string `json:"kind,omitempty"`
279
280	// UpdateOccurred: Flag to indicate if the requested update actually
281	// occurred.
282	UpdateOccurred bool `json:"updateOccurred,omitempty"`
283
284	// ServerResponse contains the HTTP response code and headers from the
285	// server.
286	googleapi.ServerResponse `json:"-"`
287
288	// ForceSendFields is a list of field names (e.g. "CurrentState") to
289	// unconditionally include in API requests. By default, fields with
290	// empty values are omitted from API requests. However, any non-pointer,
291	// non-interface field appearing in ForceSendFields will be sent to the
292	// server regardless of whether the field is empty or not. This may be
293	// used to include empty fields in Patch requests.
294	ForceSendFields []string `json:"-"`
295
296	// NullFields is a list of field names (e.g. "CurrentState") to include
297	// in API requests with the JSON null value. By default, fields with
298	// empty values are omitted from API requests. However, any field with
299	// an empty value appearing in NullFields will be sent to the server as
300	// null. It is an error if a field in this list has a non-empty value.
301	// This may be used to include null fields in Patch requests.
302	NullFields []string `json:"-"`
303}
304
305func (s *AchievementResetResponse) MarshalJSON() ([]byte, error) {
306	type NoMethod AchievementResetResponse
307	raw := NoMethod(*s)
308	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
309}
310
311// EventsResetMultipleForAllRequest: Multiple events reset all request.
312type EventsResetMultipleForAllRequest struct {
313	// EventIds: The IDs of events to reset.
314	EventIds []string `json:"event_ids,omitempty"`
315
316	// Kind: Uniquely identifies the type of this resource. Value is always
317	// the fixed string `gamesManagement#eventsResetMultipleForAllRequest`.
318	Kind string `json:"kind,omitempty"`
319
320	// ForceSendFields is a list of field names (e.g. "EventIds") to
321	// unconditionally include in API requests. By default, fields with
322	// empty values are omitted from API requests. However, any non-pointer,
323	// non-interface field appearing in ForceSendFields will be sent to the
324	// server regardless of whether the field is empty or not. This may be
325	// used to include empty fields in Patch requests.
326	ForceSendFields []string `json:"-"`
327
328	// NullFields is a list of field names (e.g. "EventIds") to include in
329	// API requests with the JSON null value. By default, fields with empty
330	// values are omitted from API requests. However, any field with an
331	// empty value appearing in NullFields will be sent to the server as
332	// null. It is an error if a field in this list has a non-empty value.
333	// This may be used to include null fields in Patch requests.
334	NullFields []string `json:"-"`
335}
336
337func (s *EventsResetMultipleForAllRequest) MarshalJSON() ([]byte, error) {
338	type NoMethod EventsResetMultipleForAllRequest
339	raw := NoMethod(*s)
340	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
341}
342
343// GamesPlayerExperienceInfoResource: 1P/3P metadata about the player's
344// experience.
345type GamesPlayerExperienceInfoResource struct {
346	// CurrentExperiencePoints: The current number of experience points for
347	// the player.
348	CurrentExperiencePoints int64 `json:"currentExperiencePoints,omitempty,string"`
349
350	// CurrentLevel: The current level of the player.
351	CurrentLevel *GamesPlayerLevelResource `json:"currentLevel,omitempty"`
352
353	// LastLevelUpTimestampMillis: The timestamp when the player was leveled
354	// up, in millis since Unix epoch UTC.
355	LastLevelUpTimestampMillis int64 `json:"lastLevelUpTimestampMillis,omitempty,string"`
356
357	// NextLevel: The next level of the player. If the current level is the
358	// maximum level, this should be same as the current level.
359	NextLevel *GamesPlayerLevelResource `json:"nextLevel,omitempty"`
360
361	// ForceSendFields is a list of field names (e.g.
362	// "CurrentExperiencePoints") to unconditionally include in API
363	// requests. By default, fields with empty values are omitted from API
364	// requests. However, any non-pointer, non-interface field appearing in
365	// ForceSendFields will be sent to the server regardless of whether the
366	// field is empty or not. This may be used to include empty fields in
367	// Patch requests.
368	ForceSendFields []string `json:"-"`
369
370	// NullFields is a list of field names (e.g. "CurrentExperiencePoints")
371	// to include in API requests with the JSON null value. By default,
372	// fields with empty values are omitted from API requests. However, any
373	// field with an empty value appearing in NullFields will be sent to the
374	// server as null. It is an error if a field in this list has a
375	// non-empty value. This may be used to include null fields in Patch
376	// requests.
377	NullFields []string `json:"-"`
378}
379
380func (s *GamesPlayerExperienceInfoResource) MarshalJSON() ([]byte, error) {
381	type NoMethod GamesPlayerExperienceInfoResource
382	raw := NoMethod(*s)
383	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
384}
385
386// GamesPlayerLevelResource: 1P/3P metadata about a user's level.
387type GamesPlayerLevelResource struct {
388	// Level: The level for the user.
389	Level int64 `json:"level,omitempty"`
390
391	// MaxExperiencePoints: The maximum experience points for this level.
392	MaxExperiencePoints int64 `json:"maxExperiencePoints,omitempty,string"`
393
394	// MinExperiencePoints: The minimum experience points for this level.
395	MinExperiencePoints int64 `json:"minExperiencePoints,omitempty,string"`
396
397	// ForceSendFields is a list of field names (e.g. "Level") to
398	// unconditionally include in API requests. By default, fields with
399	// empty values are omitted from API requests. However, any non-pointer,
400	// non-interface field appearing in ForceSendFields will be sent to the
401	// server regardless of whether the field is empty or not. This may be
402	// used to include empty fields in Patch requests.
403	ForceSendFields []string `json:"-"`
404
405	// NullFields is a list of field names (e.g. "Level") to include in API
406	// requests with the JSON null value. By default, fields with empty
407	// values are omitted from API requests. However, any field with an
408	// empty value appearing in NullFields will be sent to the server as
409	// null. It is an error if a field in this list has a non-empty value.
410	// This may be used to include null fields in Patch requests.
411	NullFields []string `json:"-"`
412}
413
414func (s *GamesPlayerLevelResource) MarshalJSON() ([]byte, error) {
415	type NoMethod GamesPlayerLevelResource
416	raw := NoMethod(*s)
417	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
418}
419
420// HiddenPlayer: The HiddenPlayer resource.
421type HiddenPlayer struct {
422	// HiddenTimeMillis: Output only. The time this player was hidden.
423	HiddenTimeMillis int64 `json:"hiddenTimeMillis,omitempty,string"`
424
425	// Kind: Output only. Uniquely identifies the type of this resource.
426	// Value is always the fixed string `gamesManagement#hiddenPlayer`.
427	Kind string `json:"kind,omitempty"`
428
429	// Player: Output only. The player information.
430	Player *Player `json:"player,omitempty"`
431
432	// ForceSendFields is a list of field names (e.g. "HiddenTimeMillis") to
433	// unconditionally include in API requests. By default, fields with
434	// empty values are omitted from API requests. However, any non-pointer,
435	// non-interface field appearing in ForceSendFields will be sent to the
436	// server regardless of whether the field is empty or not. This may be
437	// used to include empty fields in Patch requests.
438	ForceSendFields []string `json:"-"`
439
440	// NullFields is a list of field names (e.g. "HiddenTimeMillis") to
441	// include in API requests with the JSON null value. By default, fields
442	// with empty values are omitted from API requests. However, any field
443	// with an empty value appearing in NullFields will be sent to the
444	// server as null. It is an error if a field in this list has a
445	// non-empty value. This may be used to include null fields in Patch
446	// requests.
447	NullFields []string `json:"-"`
448}
449
450func (s *HiddenPlayer) MarshalJSON() ([]byte, error) {
451	type NoMethod HiddenPlayer
452	raw := NoMethod(*s)
453	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
454}
455
456// HiddenPlayerList: A list of hidden players.
457type HiddenPlayerList struct {
458	// Items: The players.
459	Items []*HiddenPlayer `json:"items,omitempty"`
460
461	// Kind: Uniquely identifies the type of this resource. Value is always
462	// the fixed string `gamesManagement#hiddenPlayerList`.
463	Kind string `json:"kind,omitempty"`
464
465	// NextPageToken: The pagination token for the next page of results.
466	NextPageToken string `json:"nextPageToken,omitempty"`
467
468	// ServerResponse contains the HTTP response code and headers from the
469	// server.
470	googleapi.ServerResponse `json:"-"`
471
472	// ForceSendFields is a list of field names (e.g. "Items") to
473	// unconditionally include in API requests. By default, fields with
474	// empty values are omitted from API requests. However, any non-pointer,
475	// non-interface field appearing in ForceSendFields will be sent to the
476	// server regardless of whether the field is empty or not. This may be
477	// used to include empty fields in Patch requests.
478	ForceSendFields []string `json:"-"`
479
480	// NullFields is a list of field names (e.g. "Items") to include in API
481	// requests with the JSON null value. By default, fields with empty
482	// values are omitted from API requests. However, any field with an
483	// empty value appearing in NullFields will be sent to the server as
484	// null. It is an error if a field in this list has a non-empty value.
485	// This may be used to include null fields in Patch requests.
486	NullFields []string `json:"-"`
487}
488
489func (s *HiddenPlayerList) MarshalJSON() ([]byte, error) {
490	type NoMethod HiddenPlayerList
491	raw := NoMethod(*s)
492	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
493}
494
495// Player: A Player resource.
496type Player struct {
497	// AvatarImageUrl: The base URL for the image that represents the
498	// player.
499	AvatarImageUrl string `json:"avatarImageUrl,omitempty"`
500
501	// BannerUrlLandscape: The url to the landscape mode player banner
502	// image.
503	BannerUrlLandscape string `json:"bannerUrlLandscape,omitempty"`
504
505	// BannerUrlPortrait: The url to the portrait mode player banner image.
506	BannerUrlPortrait string `json:"bannerUrlPortrait,omitempty"`
507
508	// DisplayName: The name to display for the player.
509	DisplayName string `json:"displayName,omitempty"`
510
511	// ExperienceInfo: An object to represent Play Game experience
512	// information for the player.
513	ExperienceInfo *GamesPlayerExperienceInfoResource `json:"experienceInfo,omitempty"`
514
515	// Kind: Uniquely identifies the type of this resource. Value is always
516	// the fixed string `gamesManagement#player`.
517	Kind string `json:"kind,omitempty"`
518
519	// Name: An object representation of the individual components of the
520	// player's name. For some players, these fields may not be present.
521	Name *PlayerName `json:"name,omitempty"`
522
523	// OriginalPlayerId: The player ID that was used for this player the
524	// first time they signed into the game in question. This is only
525	// populated for calls to player.get for the requesting player, only if
526	// the player ID has subsequently changed, and only to clients that
527	// support remapping player IDs.
528	OriginalPlayerId string `json:"originalPlayerId,omitempty"`
529
530	// PlayerId: The ID of the player.
531	PlayerId string `json:"playerId,omitempty"`
532
533	// ProfileSettings: The player's profile settings. Controls whether or
534	// not the player's profile is visible to other players.
535	ProfileSettings *ProfileSettings `json:"profileSettings,omitempty"`
536
537	// Title: The player's title rewarded for their game activities.
538	Title string `json:"title,omitempty"`
539
540	// ForceSendFields is a list of field names (e.g. "AvatarImageUrl") to
541	// unconditionally include in API requests. By default, fields with
542	// empty values are omitted from API requests. However, any non-pointer,
543	// non-interface field appearing in ForceSendFields will be sent to the
544	// server regardless of whether the field is empty or not. This may be
545	// used to include empty fields in Patch requests.
546	ForceSendFields []string `json:"-"`
547
548	// NullFields is a list of field names (e.g. "AvatarImageUrl") to
549	// include in API requests with the JSON null value. By default, fields
550	// with empty values are omitted from API requests. However, any field
551	// with an empty value appearing in NullFields will be sent to the
552	// server as null. It is an error if a field in this list has a
553	// non-empty value. This may be used to include null fields in Patch
554	// requests.
555	NullFields []string `json:"-"`
556}
557
558func (s *Player) MarshalJSON() ([]byte, error) {
559	type NoMethod Player
560	raw := NoMethod(*s)
561	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
562}
563
564// PlayerName: An object representation of the individual components of
565// the player's name. For some players, these fields may not be present.
566type PlayerName struct {
567	// FamilyName: The family name of this player. In some places, this is
568	// known as the last name.
569	FamilyName string `json:"familyName,omitempty"`
570
571	// GivenName: The given name of this player. In some places, this is
572	// known as the first name.
573	GivenName string `json:"givenName,omitempty"`
574
575	// ForceSendFields is a list of field names (e.g. "FamilyName") to
576	// unconditionally include in API requests. By default, fields with
577	// empty values are omitted from API requests. However, any non-pointer,
578	// non-interface field appearing in ForceSendFields will be sent to the
579	// server regardless of whether the field is empty or not. This may be
580	// used to include empty fields in Patch requests.
581	ForceSendFields []string `json:"-"`
582
583	// NullFields is a list of field names (e.g. "FamilyName") to include in
584	// API requests with the JSON null value. By default, fields with empty
585	// values are omitted from API requests. However, any field with an
586	// empty value appearing in NullFields will be sent to the server as
587	// null. It is an error if a field in this list has a non-empty value.
588	// This may be used to include null fields in Patch requests.
589	NullFields []string `json:"-"`
590}
591
592func (s *PlayerName) MarshalJSON() ([]byte, error) {
593	type NoMethod PlayerName
594	raw := NoMethod(*s)
595	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
596}
597
598// PlayerScoreResetAllResponse: A list of leaderboard reset resources.
599type PlayerScoreResetAllResponse struct {
600	// Kind: Uniquely identifies the type of this resource. Value is always
601	// the fixed string `gamesManagement#playerScoreResetAllResponse`.
602	Kind string `json:"kind,omitempty"`
603
604	// Results: The leaderboard reset results.
605	Results []*PlayerScoreResetResponse `json:"results,omitempty"`
606
607	// ServerResponse contains the HTTP response code and headers from the
608	// server.
609	googleapi.ServerResponse `json:"-"`
610
611	// ForceSendFields is a list of field names (e.g. "Kind") to
612	// unconditionally include in API requests. By default, fields with
613	// empty values are omitted from API requests. However, any non-pointer,
614	// non-interface field appearing in ForceSendFields will be sent to the
615	// server regardless of whether the field is empty or not. This may be
616	// used to include empty fields in Patch requests.
617	ForceSendFields []string `json:"-"`
618
619	// NullFields is a list of field names (e.g. "Kind") to include in API
620	// requests with the JSON null value. By default, fields with empty
621	// values are omitted from API requests. However, any field with an
622	// empty value appearing in NullFields will be sent to the server as
623	// null. It is an error if a field in this list has a non-empty value.
624	// This may be used to include null fields in Patch requests.
625	NullFields []string `json:"-"`
626}
627
628func (s *PlayerScoreResetAllResponse) MarshalJSON() ([]byte, error) {
629	type NoMethod PlayerScoreResetAllResponse
630	raw := NoMethod(*s)
631	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
632}
633
634// PlayerScoreResetResponse: A list of reset leaderboard entry
635// resources.
636type PlayerScoreResetResponse struct {
637	// DefinitionId: The ID of an leaderboard for which player state has
638	// been updated.
639	DefinitionId string `json:"definitionId,omitempty"`
640
641	// Kind: Uniquely identifies the type of this resource. Value is always
642	// the fixed string `gamesManagement#playerScoreResetResponse`.
643	Kind string `json:"kind,omitempty"`
644
645	// ResetScoreTimeSpans: The time spans of the updated score. Possible
646	// values are: - "ALL_TIME" - The score is an all-time score. -
647	// "WEEKLY" - The score is a weekly score. - "DAILY" - The score is
648	// a daily score.
649	ResetScoreTimeSpans []string `json:"resetScoreTimeSpans,omitempty"`
650
651	// ServerResponse contains the HTTP response code and headers from the
652	// server.
653	googleapi.ServerResponse `json:"-"`
654
655	// ForceSendFields is a list of field names (e.g. "DefinitionId") to
656	// unconditionally include in API requests. By default, fields with
657	// empty values are omitted from API requests. However, any non-pointer,
658	// non-interface field appearing in ForceSendFields will be sent to the
659	// server regardless of whether the field is empty or not. This may be
660	// used to include empty fields in Patch requests.
661	ForceSendFields []string `json:"-"`
662
663	// NullFields is a list of field names (e.g. "DefinitionId") to include
664	// in API requests with the JSON null value. By default, fields with
665	// empty values are omitted from API requests. However, any field with
666	// an empty value appearing in NullFields will be sent to the server as
667	// null. It is an error if a field in this list has a non-empty value.
668	// This may be used to include null fields in Patch requests.
669	NullFields []string `json:"-"`
670}
671
672func (s *PlayerScoreResetResponse) MarshalJSON() ([]byte, error) {
673	type NoMethod PlayerScoreResetResponse
674	raw := NoMethod(*s)
675	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
676}
677
678// ProfileSettings: Profile settings
679type ProfileSettings struct {
680	// Kind: Uniquely identifies the type of this resource. Value is always
681	// the fixed string `gamesManagement#profileSettings`.
682	Kind string `json:"kind,omitempty"`
683
684	ProfileVisible bool `json:"profileVisible,omitempty"`
685
686	// ForceSendFields is a list of field names (e.g. "Kind") to
687	// unconditionally include in API requests. By default, fields with
688	// empty values are omitted from API requests. However, any non-pointer,
689	// non-interface field appearing in ForceSendFields will be sent to the
690	// server regardless of whether the field is empty or not. This may be
691	// used to include empty fields in Patch requests.
692	ForceSendFields []string `json:"-"`
693
694	// NullFields is a list of field names (e.g. "Kind") to include in API
695	// requests with the JSON null value. By default, fields with empty
696	// values are omitted from API requests. However, any field with an
697	// empty value appearing in NullFields will be sent to the server as
698	// null. It is an error if a field in this list has a non-empty value.
699	// This may be used to include null fields in Patch requests.
700	NullFields []string `json:"-"`
701}
702
703func (s *ProfileSettings) MarshalJSON() ([]byte, error) {
704	type NoMethod ProfileSettings
705	raw := NoMethod(*s)
706	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
707}
708
709type ScoresResetMultipleForAllRequest struct {
710	// Kind: Uniquely identifies the type of this resource. Value is always
711	// the fixed string `gamesManagement#scoresResetMultipleForAllRequest`.
712	Kind string `json:"kind,omitempty"`
713
714	// LeaderboardIds: The IDs of leaderboards to reset.
715	LeaderboardIds []string `json:"leaderboard_ids,omitempty"`
716
717	// ForceSendFields is a list of field names (e.g. "Kind") to
718	// unconditionally include in API requests. By default, fields with
719	// empty values are omitted from API requests. However, any non-pointer,
720	// non-interface field appearing in ForceSendFields will be sent to the
721	// server regardless of whether the field is empty or not. This may be
722	// used to include empty fields in Patch requests.
723	ForceSendFields []string `json:"-"`
724
725	// NullFields is a list of field names (e.g. "Kind") to include in API
726	// requests with the JSON null value. By default, fields with empty
727	// values are omitted from API requests. However, any field with an
728	// empty value appearing in NullFields will be sent to the server as
729	// null. It is an error if a field in this list has a non-empty value.
730	// This may be used to include null fields in Patch requests.
731	NullFields []string `json:"-"`
732}
733
734func (s *ScoresResetMultipleForAllRequest) MarshalJSON() ([]byte, error) {
735	type NoMethod ScoresResetMultipleForAllRequest
736	raw := NoMethod(*s)
737	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
738}
739
740// method id "gamesManagement.achievements.reset":
741
742type AchievementsResetCall struct {
743	s             *Service
744	achievementId string
745	urlParams_    gensupport.URLParams
746	ctx_          context.Context
747	header_       http.Header
748}
749
750// Reset: Resets the achievement with the given ID for the currently
751// authenticated player. This method is only accessible to whitelisted
752// tester accounts for your application.
753func (r *AchievementsService) Reset(achievementId string) *AchievementsResetCall {
754	c := &AchievementsResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
755	c.achievementId = achievementId
756	return c
757}
758
759// Fields allows partial responses to be retrieved. See
760// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
761// for more information.
762func (c *AchievementsResetCall) Fields(s ...googleapi.Field) *AchievementsResetCall {
763	c.urlParams_.Set("fields", googleapi.CombineFields(s))
764	return c
765}
766
767// Context sets the context to be used in this call's Do method. Any
768// pending HTTP request will be aborted if the provided context is
769// canceled.
770func (c *AchievementsResetCall) Context(ctx context.Context) *AchievementsResetCall {
771	c.ctx_ = ctx
772	return c
773}
774
775// Header returns an http.Header that can be modified by the caller to
776// add HTTP headers to the request.
777func (c *AchievementsResetCall) Header() http.Header {
778	if c.header_ == nil {
779		c.header_ = make(http.Header)
780	}
781	return c.header_
782}
783
784func (c *AchievementsResetCall) doRequest(alt string) (*http.Response, error) {
785	reqHeaders := make(http.Header)
786	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
787	for k, v := range c.header_ {
788		reqHeaders[k] = v
789	}
790	reqHeaders.Set("User-Agent", c.s.userAgent())
791	var body io.Reader = nil
792	c.urlParams_.Set("alt", alt)
793	c.urlParams_.Set("prettyPrint", "false")
794	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/achievements/{achievementId}/reset")
795	urls += "?" + c.urlParams_.Encode()
796	req, err := http.NewRequest("POST", urls, body)
797	if err != nil {
798		return nil, err
799	}
800	req.Header = reqHeaders
801	googleapi.Expand(req.URL, map[string]string{
802		"achievementId": c.achievementId,
803	})
804	return gensupport.SendRequest(c.ctx_, c.s.client, req)
805}
806
807// Do executes the "gamesManagement.achievements.reset" call.
808// Exactly one of *AchievementResetResponse or error will be non-nil.
809// Any non-2xx status code is an error. Response headers are in either
810// *AchievementResetResponse.ServerResponse.Header or (if a response was
811// returned at all) in error.(*googleapi.Error).Header. Use
812// googleapi.IsNotModified to check whether the returned error was
813// because http.StatusNotModified was returned.
814func (c *AchievementsResetCall) Do(opts ...googleapi.CallOption) (*AchievementResetResponse, error) {
815	gensupport.SetOptions(c.urlParams_, opts...)
816	res, err := c.doRequest("json")
817	if res != nil && res.StatusCode == http.StatusNotModified {
818		if res.Body != nil {
819			res.Body.Close()
820		}
821		return nil, &googleapi.Error{
822			Code:   res.StatusCode,
823			Header: res.Header,
824		}
825	}
826	if err != nil {
827		return nil, err
828	}
829	defer googleapi.CloseBody(res)
830	if err := googleapi.CheckResponse(res); err != nil {
831		return nil, err
832	}
833	ret := &AchievementResetResponse{
834		ServerResponse: googleapi.ServerResponse{
835			Header:         res.Header,
836			HTTPStatusCode: res.StatusCode,
837		},
838	}
839	target := &ret
840	if err := gensupport.DecodeResponse(target, res); err != nil {
841		return nil, err
842	}
843	return ret, nil
844	// {
845	//   "description": "Resets the achievement with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your application.",
846	//   "flatPath": "games/v1management/achievements/{achievementId}/reset",
847	//   "httpMethod": "POST",
848	//   "id": "gamesManagement.achievements.reset",
849	//   "parameterOrder": [
850	//     "achievementId"
851	//   ],
852	//   "parameters": {
853	//     "achievementId": {
854	//       "description": "The ID of the achievement used by this method.",
855	//       "location": "path",
856	//       "required": true,
857	//       "type": "string"
858	//     }
859	//   },
860	//   "path": "games/v1management/achievements/{achievementId}/reset",
861	//   "response": {
862	//     "$ref": "AchievementResetResponse"
863	//   },
864	//   "scopes": [
865	//     "https://www.googleapis.com/auth/games"
866	//   ]
867	// }
868
869}
870
871// method id "gamesManagement.achievements.resetAll":
872
873type AchievementsResetAllCall struct {
874	s          *Service
875	urlParams_ gensupport.URLParams
876	ctx_       context.Context
877	header_    http.Header
878}
879
880// ResetAll: Resets all achievements for the currently authenticated
881// player for your application. This method is only accessible to
882// whitelisted tester accounts for your application.
883func (r *AchievementsService) ResetAll() *AchievementsResetAllCall {
884	c := &AchievementsResetAllCall{s: r.s, urlParams_: make(gensupport.URLParams)}
885	return c
886}
887
888// Fields allows partial responses to be retrieved. See
889// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
890// for more information.
891func (c *AchievementsResetAllCall) Fields(s ...googleapi.Field) *AchievementsResetAllCall {
892	c.urlParams_.Set("fields", googleapi.CombineFields(s))
893	return c
894}
895
896// Context sets the context to be used in this call's Do method. Any
897// pending HTTP request will be aborted if the provided context is
898// canceled.
899func (c *AchievementsResetAllCall) Context(ctx context.Context) *AchievementsResetAllCall {
900	c.ctx_ = ctx
901	return c
902}
903
904// Header returns an http.Header that can be modified by the caller to
905// add HTTP headers to the request.
906func (c *AchievementsResetAllCall) Header() http.Header {
907	if c.header_ == nil {
908		c.header_ = make(http.Header)
909	}
910	return c.header_
911}
912
913func (c *AchievementsResetAllCall) doRequest(alt string) (*http.Response, error) {
914	reqHeaders := make(http.Header)
915	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
916	for k, v := range c.header_ {
917		reqHeaders[k] = v
918	}
919	reqHeaders.Set("User-Agent", c.s.userAgent())
920	var body io.Reader = nil
921	c.urlParams_.Set("alt", alt)
922	c.urlParams_.Set("prettyPrint", "false")
923	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/achievements/reset")
924	urls += "?" + c.urlParams_.Encode()
925	req, err := http.NewRequest("POST", urls, body)
926	if err != nil {
927		return nil, err
928	}
929	req.Header = reqHeaders
930	return gensupport.SendRequest(c.ctx_, c.s.client, req)
931}
932
933// Do executes the "gamesManagement.achievements.resetAll" call.
934// Exactly one of *AchievementResetAllResponse or error will be non-nil.
935// Any non-2xx status code is an error. Response headers are in either
936// *AchievementResetAllResponse.ServerResponse.Header or (if a response
937// was returned at all) in error.(*googleapi.Error).Header. Use
938// googleapi.IsNotModified to check whether the returned error was
939// because http.StatusNotModified was returned.
940func (c *AchievementsResetAllCall) Do(opts ...googleapi.CallOption) (*AchievementResetAllResponse, error) {
941	gensupport.SetOptions(c.urlParams_, opts...)
942	res, err := c.doRequest("json")
943	if res != nil && res.StatusCode == http.StatusNotModified {
944		if res.Body != nil {
945			res.Body.Close()
946		}
947		return nil, &googleapi.Error{
948			Code:   res.StatusCode,
949			Header: res.Header,
950		}
951	}
952	if err != nil {
953		return nil, err
954	}
955	defer googleapi.CloseBody(res)
956	if err := googleapi.CheckResponse(res); err != nil {
957		return nil, err
958	}
959	ret := &AchievementResetAllResponse{
960		ServerResponse: googleapi.ServerResponse{
961			Header:         res.Header,
962			HTTPStatusCode: res.StatusCode,
963		},
964	}
965	target := &ret
966	if err := gensupport.DecodeResponse(target, res); err != nil {
967		return nil, err
968	}
969	return ret, nil
970	// {
971	//   "description": "Resets all achievements for the currently authenticated player for your application. This method is only accessible to whitelisted tester accounts for your application.",
972	//   "flatPath": "games/v1management/achievements/reset",
973	//   "httpMethod": "POST",
974	//   "id": "gamesManagement.achievements.resetAll",
975	//   "parameterOrder": [],
976	//   "parameters": {},
977	//   "path": "games/v1management/achievements/reset",
978	//   "response": {
979	//     "$ref": "AchievementResetAllResponse"
980	//   },
981	//   "scopes": [
982	//     "https://www.googleapis.com/auth/games"
983	//   ]
984	// }
985
986}
987
988// method id "gamesManagement.achievements.resetAllForAllPlayers":
989
990type AchievementsResetAllForAllPlayersCall struct {
991	s          *Service
992	urlParams_ gensupport.URLParams
993	ctx_       context.Context
994	header_    http.Header
995}
996
997// ResetAllForAllPlayers: Resets all draft achievements for all players.
998// This method is only available to user accounts for your developer
999// console.
1000func (r *AchievementsService) ResetAllForAllPlayers() *AchievementsResetAllForAllPlayersCall {
1001	c := &AchievementsResetAllForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1002	return c
1003}
1004
1005// Fields allows partial responses to be retrieved. See
1006// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1007// for more information.
1008func (c *AchievementsResetAllForAllPlayersCall) Fields(s ...googleapi.Field) *AchievementsResetAllForAllPlayersCall {
1009	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1010	return c
1011}
1012
1013// Context sets the context to be used in this call's Do method. Any
1014// pending HTTP request will be aborted if the provided context is
1015// canceled.
1016func (c *AchievementsResetAllForAllPlayersCall) Context(ctx context.Context) *AchievementsResetAllForAllPlayersCall {
1017	c.ctx_ = ctx
1018	return c
1019}
1020
1021// Header returns an http.Header that can be modified by the caller to
1022// add HTTP headers to the request.
1023func (c *AchievementsResetAllForAllPlayersCall) Header() http.Header {
1024	if c.header_ == nil {
1025		c.header_ = make(http.Header)
1026	}
1027	return c.header_
1028}
1029
1030func (c *AchievementsResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
1031	reqHeaders := make(http.Header)
1032	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1033	for k, v := range c.header_ {
1034		reqHeaders[k] = v
1035	}
1036	reqHeaders.Set("User-Agent", c.s.userAgent())
1037	var body io.Reader = nil
1038	c.urlParams_.Set("alt", alt)
1039	c.urlParams_.Set("prettyPrint", "false")
1040	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/achievements/resetAllForAllPlayers")
1041	urls += "?" + c.urlParams_.Encode()
1042	req, err := http.NewRequest("POST", urls, body)
1043	if err != nil {
1044		return nil, err
1045	}
1046	req.Header = reqHeaders
1047	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1048}
1049
1050// Do executes the "gamesManagement.achievements.resetAllForAllPlayers" call.
1051func (c *AchievementsResetAllForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
1052	gensupport.SetOptions(c.urlParams_, opts...)
1053	res, err := c.doRequest("json")
1054	if err != nil {
1055		return err
1056	}
1057	defer googleapi.CloseBody(res)
1058	if err := googleapi.CheckResponse(res); err != nil {
1059		return err
1060	}
1061	return nil
1062	// {
1063	//   "description": "Resets all draft achievements for all players. This method is only available to user accounts for your developer console.",
1064	//   "flatPath": "games/v1management/achievements/resetAllForAllPlayers",
1065	//   "httpMethod": "POST",
1066	//   "id": "gamesManagement.achievements.resetAllForAllPlayers",
1067	//   "parameterOrder": [],
1068	//   "parameters": {},
1069	//   "path": "games/v1management/achievements/resetAllForAllPlayers",
1070	//   "scopes": [
1071	//     "https://www.googleapis.com/auth/games"
1072	//   ]
1073	// }
1074
1075}
1076
1077// method id "gamesManagement.achievements.resetForAllPlayers":
1078
1079type AchievementsResetForAllPlayersCall struct {
1080	s             *Service
1081	achievementId string
1082	urlParams_    gensupport.URLParams
1083	ctx_          context.Context
1084	header_       http.Header
1085}
1086
1087// ResetForAllPlayers: Resets the achievement with the given ID for all
1088// players. This method is only available to user accounts for your
1089// developer console. Only draft achievements can be reset.
1090func (r *AchievementsService) ResetForAllPlayers(achievementId string) *AchievementsResetForAllPlayersCall {
1091	c := &AchievementsResetForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1092	c.achievementId = achievementId
1093	return c
1094}
1095
1096// Fields allows partial responses to be retrieved. See
1097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1098// for more information.
1099func (c *AchievementsResetForAllPlayersCall) Fields(s ...googleapi.Field) *AchievementsResetForAllPlayersCall {
1100	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1101	return c
1102}
1103
1104// Context sets the context to be used in this call's Do method. Any
1105// pending HTTP request will be aborted if the provided context is
1106// canceled.
1107func (c *AchievementsResetForAllPlayersCall) Context(ctx context.Context) *AchievementsResetForAllPlayersCall {
1108	c.ctx_ = ctx
1109	return c
1110}
1111
1112// Header returns an http.Header that can be modified by the caller to
1113// add HTTP headers to the request.
1114func (c *AchievementsResetForAllPlayersCall) Header() http.Header {
1115	if c.header_ == nil {
1116		c.header_ = make(http.Header)
1117	}
1118	return c.header_
1119}
1120
1121func (c *AchievementsResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
1122	reqHeaders := make(http.Header)
1123	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1124	for k, v := range c.header_ {
1125		reqHeaders[k] = v
1126	}
1127	reqHeaders.Set("User-Agent", c.s.userAgent())
1128	var body io.Reader = nil
1129	c.urlParams_.Set("alt", alt)
1130	c.urlParams_.Set("prettyPrint", "false")
1131	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/achievements/{achievementId}/resetForAllPlayers")
1132	urls += "?" + c.urlParams_.Encode()
1133	req, err := http.NewRequest("POST", urls, body)
1134	if err != nil {
1135		return nil, err
1136	}
1137	req.Header = reqHeaders
1138	googleapi.Expand(req.URL, map[string]string{
1139		"achievementId": c.achievementId,
1140	})
1141	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1142}
1143
1144// Do executes the "gamesManagement.achievements.resetForAllPlayers" call.
1145func (c *AchievementsResetForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
1146	gensupport.SetOptions(c.urlParams_, opts...)
1147	res, err := c.doRequest("json")
1148	if err != nil {
1149		return err
1150	}
1151	defer googleapi.CloseBody(res)
1152	if err := googleapi.CheckResponse(res); err != nil {
1153		return err
1154	}
1155	return nil
1156	// {
1157	//   "description": "Resets the achievement with the given ID for all players. This method is only available to user accounts for your developer console. Only draft achievements can be reset.",
1158	//   "flatPath": "games/v1management/achievements/{achievementId}/resetForAllPlayers",
1159	//   "httpMethod": "POST",
1160	//   "id": "gamesManagement.achievements.resetForAllPlayers",
1161	//   "parameterOrder": [
1162	//     "achievementId"
1163	//   ],
1164	//   "parameters": {
1165	//     "achievementId": {
1166	//       "description": "The ID of the achievement used by this method.",
1167	//       "location": "path",
1168	//       "required": true,
1169	//       "type": "string"
1170	//     }
1171	//   },
1172	//   "path": "games/v1management/achievements/{achievementId}/resetForAllPlayers",
1173	//   "scopes": [
1174	//     "https://www.googleapis.com/auth/games"
1175	//   ]
1176	// }
1177
1178}
1179
1180// method id "gamesManagement.achievements.resetMultipleForAllPlayers":
1181
1182type AchievementsResetMultipleForAllPlayersCall struct {
1183	s                                     *Service
1184	achievementresetmultipleforallrequest *AchievementResetMultipleForAllRequest
1185	urlParams_                            gensupport.URLParams
1186	ctx_                                  context.Context
1187	header_                               http.Header
1188}
1189
1190// ResetMultipleForAllPlayers: Resets achievements with the given IDs
1191// for all players. This method is only available to user accounts for
1192// your developer console. Only draft achievements may be reset.
1193func (r *AchievementsService) ResetMultipleForAllPlayers(achievementresetmultipleforallrequest *AchievementResetMultipleForAllRequest) *AchievementsResetMultipleForAllPlayersCall {
1194	c := &AchievementsResetMultipleForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1195	c.achievementresetmultipleforallrequest = achievementresetmultipleforallrequest
1196	return c
1197}
1198
1199// Fields allows partial responses to be retrieved. See
1200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1201// for more information.
1202func (c *AchievementsResetMultipleForAllPlayersCall) Fields(s ...googleapi.Field) *AchievementsResetMultipleForAllPlayersCall {
1203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1204	return c
1205}
1206
1207// Context sets the context to be used in this call's Do method. Any
1208// pending HTTP request will be aborted if the provided context is
1209// canceled.
1210func (c *AchievementsResetMultipleForAllPlayersCall) Context(ctx context.Context) *AchievementsResetMultipleForAllPlayersCall {
1211	c.ctx_ = ctx
1212	return c
1213}
1214
1215// Header returns an http.Header that can be modified by the caller to
1216// add HTTP headers to the request.
1217func (c *AchievementsResetMultipleForAllPlayersCall) Header() http.Header {
1218	if c.header_ == nil {
1219		c.header_ = make(http.Header)
1220	}
1221	return c.header_
1222}
1223
1224func (c *AchievementsResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
1225	reqHeaders := make(http.Header)
1226	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1227	for k, v := range c.header_ {
1228		reqHeaders[k] = v
1229	}
1230	reqHeaders.Set("User-Agent", c.s.userAgent())
1231	var body io.Reader = nil
1232	body, err := googleapi.WithoutDataWrapper.JSONReader(c.achievementresetmultipleforallrequest)
1233	if err != nil {
1234		return nil, err
1235	}
1236	reqHeaders.Set("Content-Type", "application/json")
1237	c.urlParams_.Set("alt", alt)
1238	c.urlParams_.Set("prettyPrint", "false")
1239	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/achievements/resetMultipleForAllPlayers")
1240	urls += "?" + c.urlParams_.Encode()
1241	req, err := http.NewRequest("POST", urls, body)
1242	if err != nil {
1243		return nil, err
1244	}
1245	req.Header = reqHeaders
1246	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1247}
1248
1249// Do executes the "gamesManagement.achievements.resetMultipleForAllPlayers" call.
1250func (c *AchievementsResetMultipleForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
1251	gensupport.SetOptions(c.urlParams_, opts...)
1252	res, err := c.doRequest("json")
1253	if err != nil {
1254		return err
1255	}
1256	defer googleapi.CloseBody(res)
1257	if err := googleapi.CheckResponse(res); err != nil {
1258		return err
1259	}
1260	return nil
1261	// {
1262	//   "description": "Resets achievements with the given IDs for all players. This method is only available to user accounts for your developer console. Only draft achievements may be reset.",
1263	//   "flatPath": "games/v1management/achievements/resetMultipleForAllPlayers",
1264	//   "httpMethod": "POST",
1265	//   "id": "gamesManagement.achievements.resetMultipleForAllPlayers",
1266	//   "parameterOrder": [],
1267	//   "parameters": {},
1268	//   "path": "games/v1management/achievements/resetMultipleForAllPlayers",
1269	//   "request": {
1270	//     "$ref": "AchievementResetMultipleForAllRequest"
1271	//   },
1272	//   "scopes": [
1273	//     "https://www.googleapis.com/auth/games"
1274	//   ]
1275	// }
1276
1277}
1278
1279// method id "gamesManagement.applications.listHidden":
1280
1281type ApplicationsListHiddenCall struct {
1282	s             *Service
1283	applicationId string
1284	urlParams_    gensupport.URLParams
1285	ifNoneMatch_  string
1286	ctx_          context.Context
1287	header_       http.Header
1288}
1289
1290// ListHidden: Get the list of players hidden from the given
1291// application. This method is only available to user accounts for your
1292// developer console.
1293func (r *ApplicationsService) ListHidden(applicationId string) *ApplicationsListHiddenCall {
1294	c := &ApplicationsListHiddenCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1295	c.applicationId = applicationId
1296	return c
1297}
1298
1299// MaxResults sets the optional parameter "maxResults": The maximum
1300// number of player resources to return in the response, used for
1301// paging. For any response, the actual number of player resources
1302// returned may be less than the specified `maxResults`.
1303func (c *ApplicationsListHiddenCall) MaxResults(maxResults int64) *ApplicationsListHiddenCall {
1304	c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
1305	return c
1306}
1307
1308// PageToken sets the optional parameter "pageToken": The token returned
1309// by the previous request.
1310func (c *ApplicationsListHiddenCall) PageToken(pageToken string) *ApplicationsListHiddenCall {
1311	c.urlParams_.Set("pageToken", pageToken)
1312	return c
1313}
1314
1315// Fields allows partial responses to be retrieved. See
1316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1317// for more information.
1318func (c *ApplicationsListHiddenCall) Fields(s ...googleapi.Field) *ApplicationsListHiddenCall {
1319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1320	return c
1321}
1322
1323// IfNoneMatch sets the optional parameter which makes the operation
1324// fail if the object's ETag matches the given value. This is useful for
1325// getting updates only after the object has changed since the last
1326// request. Use googleapi.IsNotModified to check whether the response
1327// error from Do is the result of In-None-Match.
1328func (c *ApplicationsListHiddenCall) IfNoneMatch(entityTag string) *ApplicationsListHiddenCall {
1329	c.ifNoneMatch_ = entityTag
1330	return c
1331}
1332
1333// Context sets the context to be used in this call's Do method. Any
1334// pending HTTP request will be aborted if the provided context is
1335// canceled.
1336func (c *ApplicationsListHiddenCall) Context(ctx context.Context) *ApplicationsListHiddenCall {
1337	c.ctx_ = ctx
1338	return c
1339}
1340
1341// Header returns an http.Header that can be modified by the caller to
1342// add HTTP headers to the request.
1343func (c *ApplicationsListHiddenCall) Header() http.Header {
1344	if c.header_ == nil {
1345		c.header_ = make(http.Header)
1346	}
1347	return c.header_
1348}
1349
1350func (c *ApplicationsListHiddenCall) doRequest(alt string) (*http.Response, error) {
1351	reqHeaders := make(http.Header)
1352	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1353	for k, v := range c.header_ {
1354		reqHeaders[k] = v
1355	}
1356	reqHeaders.Set("User-Agent", c.s.userAgent())
1357	if c.ifNoneMatch_ != "" {
1358		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
1359	}
1360	var body io.Reader = nil
1361	c.urlParams_.Set("alt", alt)
1362	c.urlParams_.Set("prettyPrint", "false")
1363	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/applications/{applicationId}/players/hidden")
1364	urls += "?" + c.urlParams_.Encode()
1365	req, err := http.NewRequest("GET", urls, body)
1366	if err != nil {
1367		return nil, err
1368	}
1369	req.Header = reqHeaders
1370	googleapi.Expand(req.URL, map[string]string{
1371		"applicationId": c.applicationId,
1372	})
1373	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1374}
1375
1376// Do executes the "gamesManagement.applications.listHidden" call.
1377// Exactly one of *HiddenPlayerList or error will be non-nil. Any
1378// non-2xx status code is an error. Response headers are in either
1379// *HiddenPlayerList.ServerResponse.Header or (if a response was
1380// returned at all) in error.(*googleapi.Error).Header. Use
1381// googleapi.IsNotModified to check whether the returned error was
1382// because http.StatusNotModified was returned.
1383func (c *ApplicationsListHiddenCall) Do(opts ...googleapi.CallOption) (*HiddenPlayerList, error) {
1384	gensupport.SetOptions(c.urlParams_, opts...)
1385	res, err := c.doRequest("json")
1386	if res != nil && res.StatusCode == http.StatusNotModified {
1387		if res.Body != nil {
1388			res.Body.Close()
1389		}
1390		return nil, &googleapi.Error{
1391			Code:   res.StatusCode,
1392			Header: res.Header,
1393		}
1394	}
1395	if err != nil {
1396		return nil, err
1397	}
1398	defer googleapi.CloseBody(res)
1399	if err := googleapi.CheckResponse(res); err != nil {
1400		return nil, err
1401	}
1402	ret := &HiddenPlayerList{
1403		ServerResponse: googleapi.ServerResponse{
1404			Header:         res.Header,
1405			HTTPStatusCode: res.StatusCode,
1406		},
1407	}
1408	target := &ret
1409	if err := gensupport.DecodeResponse(target, res); err != nil {
1410		return nil, err
1411	}
1412	return ret, nil
1413	// {
1414	//   "description": "Get the list of players hidden from the given application. This method is only available to user accounts for your developer console.",
1415	//   "flatPath": "games/v1management/applications/{applicationId}/players/hidden",
1416	//   "httpMethod": "GET",
1417	//   "id": "gamesManagement.applications.listHidden",
1418	//   "parameterOrder": [
1419	//     "applicationId"
1420	//   ],
1421	//   "parameters": {
1422	//     "applicationId": {
1423	//       "description": "The application ID from the Google Play developer console.",
1424	//       "location": "path",
1425	//       "required": true,
1426	//       "type": "string"
1427	//     },
1428	//     "maxResults": {
1429	//       "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`.",
1430	//       "format": "int32",
1431	//       "location": "query",
1432	//       "type": "integer"
1433	//     },
1434	//     "pageToken": {
1435	//       "description": "The token returned by the previous request.",
1436	//       "location": "query",
1437	//       "type": "string"
1438	//     }
1439	//   },
1440	//   "path": "games/v1management/applications/{applicationId}/players/hidden",
1441	//   "response": {
1442	//     "$ref": "HiddenPlayerList"
1443	//   },
1444	//   "scopes": [
1445	//     "https://www.googleapis.com/auth/games"
1446	//   ]
1447	// }
1448
1449}
1450
1451// Pages invokes f for each page of results.
1452// A non-nil error returned from f will halt the iteration.
1453// The provided context supersedes any context provided to the Context method.
1454func (c *ApplicationsListHiddenCall) Pages(ctx context.Context, f func(*HiddenPlayerList) error) error {
1455	c.ctx_ = ctx
1456	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
1457	for {
1458		x, err := c.Do()
1459		if err != nil {
1460			return err
1461		}
1462		if err := f(x); err != nil {
1463			return err
1464		}
1465		if x.NextPageToken == "" {
1466			return nil
1467		}
1468		c.PageToken(x.NextPageToken)
1469	}
1470}
1471
1472// method id "gamesManagement.events.reset":
1473
1474type EventsResetCall struct {
1475	s          *Service
1476	eventId    string
1477	urlParams_ gensupport.URLParams
1478	ctx_       context.Context
1479	header_    http.Header
1480}
1481
1482// Reset: Resets all player progress on the event with the given ID for
1483// the currently authenticated player. This method is only accessible to
1484// whitelisted tester accounts for your application.
1485func (r *EventsService) Reset(eventId string) *EventsResetCall {
1486	c := &EventsResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1487	c.eventId = eventId
1488	return c
1489}
1490
1491// Fields allows partial responses to be retrieved. See
1492// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1493// for more information.
1494func (c *EventsResetCall) Fields(s ...googleapi.Field) *EventsResetCall {
1495	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1496	return c
1497}
1498
1499// Context sets the context to be used in this call's Do method. Any
1500// pending HTTP request will be aborted if the provided context is
1501// canceled.
1502func (c *EventsResetCall) Context(ctx context.Context) *EventsResetCall {
1503	c.ctx_ = ctx
1504	return c
1505}
1506
1507// Header returns an http.Header that can be modified by the caller to
1508// add HTTP headers to the request.
1509func (c *EventsResetCall) Header() http.Header {
1510	if c.header_ == nil {
1511		c.header_ = make(http.Header)
1512	}
1513	return c.header_
1514}
1515
1516func (c *EventsResetCall) doRequest(alt string) (*http.Response, error) {
1517	reqHeaders := make(http.Header)
1518	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1519	for k, v := range c.header_ {
1520		reqHeaders[k] = v
1521	}
1522	reqHeaders.Set("User-Agent", c.s.userAgent())
1523	var body io.Reader = nil
1524	c.urlParams_.Set("alt", alt)
1525	c.urlParams_.Set("prettyPrint", "false")
1526	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/events/{eventId}/reset")
1527	urls += "?" + c.urlParams_.Encode()
1528	req, err := http.NewRequest("POST", urls, body)
1529	if err != nil {
1530		return nil, err
1531	}
1532	req.Header = reqHeaders
1533	googleapi.Expand(req.URL, map[string]string{
1534		"eventId": c.eventId,
1535	})
1536	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1537}
1538
1539// Do executes the "gamesManagement.events.reset" call.
1540func (c *EventsResetCall) Do(opts ...googleapi.CallOption) error {
1541	gensupport.SetOptions(c.urlParams_, opts...)
1542	res, err := c.doRequest("json")
1543	if err != nil {
1544		return err
1545	}
1546	defer googleapi.CloseBody(res)
1547	if err := googleapi.CheckResponse(res); err != nil {
1548		return err
1549	}
1550	return nil
1551	// {
1552	//   "description": "Resets all player progress on the event with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your application.",
1553	//   "flatPath": "games/v1management/events/{eventId}/reset",
1554	//   "httpMethod": "POST",
1555	//   "id": "gamesManagement.events.reset",
1556	//   "parameterOrder": [
1557	//     "eventId"
1558	//   ],
1559	//   "parameters": {
1560	//     "eventId": {
1561	//       "description": "The ID of the event.",
1562	//       "location": "path",
1563	//       "required": true,
1564	//       "type": "string"
1565	//     }
1566	//   },
1567	//   "path": "games/v1management/events/{eventId}/reset",
1568	//   "scopes": [
1569	//     "https://www.googleapis.com/auth/games"
1570	//   ]
1571	// }
1572
1573}
1574
1575// method id "gamesManagement.events.resetAll":
1576
1577type EventsResetAllCall struct {
1578	s          *Service
1579	urlParams_ gensupport.URLParams
1580	ctx_       context.Context
1581	header_    http.Header
1582}
1583
1584// ResetAll: Resets all player progress on all events for the currently
1585// authenticated player. This method is only accessible to whitelisted
1586// tester accounts for your application.
1587func (r *EventsService) ResetAll() *EventsResetAllCall {
1588	c := &EventsResetAllCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1589	return c
1590}
1591
1592// Fields allows partial responses to be retrieved. See
1593// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1594// for more information.
1595func (c *EventsResetAllCall) Fields(s ...googleapi.Field) *EventsResetAllCall {
1596	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1597	return c
1598}
1599
1600// Context sets the context to be used in this call's Do method. Any
1601// pending HTTP request will be aborted if the provided context is
1602// canceled.
1603func (c *EventsResetAllCall) Context(ctx context.Context) *EventsResetAllCall {
1604	c.ctx_ = ctx
1605	return c
1606}
1607
1608// Header returns an http.Header that can be modified by the caller to
1609// add HTTP headers to the request.
1610func (c *EventsResetAllCall) Header() http.Header {
1611	if c.header_ == nil {
1612		c.header_ = make(http.Header)
1613	}
1614	return c.header_
1615}
1616
1617func (c *EventsResetAllCall) doRequest(alt string) (*http.Response, error) {
1618	reqHeaders := make(http.Header)
1619	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1620	for k, v := range c.header_ {
1621		reqHeaders[k] = v
1622	}
1623	reqHeaders.Set("User-Agent", c.s.userAgent())
1624	var body io.Reader = nil
1625	c.urlParams_.Set("alt", alt)
1626	c.urlParams_.Set("prettyPrint", "false")
1627	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/events/reset")
1628	urls += "?" + c.urlParams_.Encode()
1629	req, err := http.NewRequest("POST", urls, body)
1630	if err != nil {
1631		return nil, err
1632	}
1633	req.Header = reqHeaders
1634	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1635}
1636
1637// Do executes the "gamesManagement.events.resetAll" call.
1638func (c *EventsResetAllCall) Do(opts ...googleapi.CallOption) error {
1639	gensupport.SetOptions(c.urlParams_, opts...)
1640	res, err := c.doRequest("json")
1641	if err != nil {
1642		return err
1643	}
1644	defer googleapi.CloseBody(res)
1645	if err := googleapi.CheckResponse(res); err != nil {
1646		return err
1647	}
1648	return nil
1649	// {
1650	//   "description": "Resets all player progress on all events for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your application.",
1651	//   "flatPath": "games/v1management/events/reset",
1652	//   "httpMethod": "POST",
1653	//   "id": "gamesManagement.events.resetAll",
1654	//   "parameterOrder": [],
1655	//   "parameters": {},
1656	//   "path": "games/v1management/events/reset",
1657	//   "scopes": [
1658	//     "https://www.googleapis.com/auth/games"
1659	//   ]
1660	// }
1661
1662}
1663
1664// method id "gamesManagement.events.resetAllForAllPlayers":
1665
1666type EventsResetAllForAllPlayersCall struct {
1667	s          *Service
1668	urlParams_ gensupport.URLParams
1669	ctx_       context.Context
1670	header_    http.Header
1671}
1672
1673// ResetAllForAllPlayers: Resets all draft events for all players. This
1674// method is only available to user accounts for your developer console.
1675func (r *EventsService) ResetAllForAllPlayers() *EventsResetAllForAllPlayersCall {
1676	c := &EventsResetAllForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1677	return c
1678}
1679
1680// Fields allows partial responses to be retrieved. See
1681// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1682// for more information.
1683func (c *EventsResetAllForAllPlayersCall) Fields(s ...googleapi.Field) *EventsResetAllForAllPlayersCall {
1684	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1685	return c
1686}
1687
1688// Context sets the context to be used in this call's Do method. Any
1689// pending HTTP request will be aborted if the provided context is
1690// canceled.
1691func (c *EventsResetAllForAllPlayersCall) Context(ctx context.Context) *EventsResetAllForAllPlayersCall {
1692	c.ctx_ = ctx
1693	return c
1694}
1695
1696// Header returns an http.Header that can be modified by the caller to
1697// add HTTP headers to the request.
1698func (c *EventsResetAllForAllPlayersCall) Header() http.Header {
1699	if c.header_ == nil {
1700		c.header_ = make(http.Header)
1701	}
1702	return c.header_
1703}
1704
1705func (c *EventsResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
1706	reqHeaders := make(http.Header)
1707	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1708	for k, v := range c.header_ {
1709		reqHeaders[k] = v
1710	}
1711	reqHeaders.Set("User-Agent", c.s.userAgent())
1712	var body io.Reader = nil
1713	c.urlParams_.Set("alt", alt)
1714	c.urlParams_.Set("prettyPrint", "false")
1715	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/events/resetAllForAllPlayers")
1716	urls += "?" + c.urlParams_.Encode()
1717	req, err := http.NewRequest("POST", urls, body)
1718	if err != nil {
1719		return nil, err
1720	}
1721	req.Header = reqHeaders
1722	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1723}
1724
1725// Do executes the "gamesManagement.events.resetAllForAllPlayers" call.
1726func (c *EventsResetAllForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
1727	gensupport.SetOptions(c.urlParams_, opts...)
1728	res, err := c.doRequest("json")
1729	if err != nil {
1730		return err
1731	}
1732	defer googleapi.CloseBody(res)
1733	if err := googleapi.CheckResponse(res); err != nil {
1734		return err
1735	}
1736	return nil
1737	// {
1738	//   "description": "Resets all draft events for all players. This method is only available to user accounts for your developer console.",
1739	//   "flatPath": "games/v1management/events/resetAllForAllPlayers",
1740	//   "httpMethod": "POST",
1741	//   "id": "gamesManagement.events.resetAllForAllPlayers",
1742	//   "parameterOrder": [],
1743	//   "parameters": {},
1744	//   "path": "games/v1management/events/resetAllForAllPlayers",
1745	//   "scopes": [
1746	//     "https://www.googleapis.com/auth/games"
1747	//   ]
1748	// }
1749
1750}
1751
1752// method id "gamesManagement.events.resetForAllPlayers":
1753
1754type EventsResetForAllPlayersCall struct {
1755	s          *Service
1756	eventId    string
1757	urlParams_ gensupport.URLParams
1758	ctx_       context.Context
1759	header_    http.Header
1760}
1761
1762// ResetForAllPlayers: Resets the event with the given ID for all
1763// players. This method is only available to user accounts for your
1764// developer console. Only draft events can be reset.
1765func (r *EventsService) ResetForAllPlayers(eventId string) *EventsResetForAllPlayersCall {
1766	c := &EventsResetForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1767	c.eventId = eventId
1768	return c
1769}
1770
1771// Fields allows partial responses to be retrieved. See
1772// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1773// for more information.
1774func (c *EventsResetForAllPlayersCall) Fields(s ...googleapi.Field) *EventsResetForAllPlayersCall {
1775	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1776	return c
1777}
1778
1779// Context sets the context to be used in this call's Do method. Any
1780// pending HTTP request will be aborted if the provided context is
1781// canceled.
1782func (c *EventsResetForAllPlayersCall) Context(ctx context.Context) *EventsResetForAllPlayersCall {
1783	c.ctx_ = ctx
1784	return c
1785}
1786
1787// Header returns an http.Header that can be modified by the caller to
1788// add HTTP headers to the request.
1789func (c *EventsResetForAllPlayersCall) Header() http.Header {
1790	if c.header_ == nil {
1791		c.header_ = make(http.Header)
1792	}
1793	return c.header_
1794}
1795
1796func (c *EventsResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
1797	reqHeaders := make(http.Header)
1798	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1799	for k, v := range c.header_ {
1800		reqHeaders[k] = v
1801	}
1802	reqHeaders.Set("User-Agent", c.s.userAgent())
1803	var body io.Reader = nil
1804	c.urlParams_.Set("alt", alt)
1805	c.urlParams_.Set("prettyPrint", "false")
1806	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/events/{eventId}/resetForAllPlayers")
1807	urls += "?" + c.urlParams_.Encode()
1808	req, err := http.NewRequest("POST", urls, body)
1809	if err != nil {
1810		return nil, err
1811	}
1812	req.Header = reqHeaders
1813	googleapi.Expand(req.URL, map[string]string{
1814		"eventId": c.eventId,
1815	})
1816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1817}
1818
1819// Do executes the "gamesManagement.events.resetForAllPlayers" call.
1820func (c *EventsResetForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
1821	gensupport.SetOptions(c.urlParams_, opts...)
1822	res, err := c.doRequest("json")
1823	if err != nil {
1824		return err
1825	}
1826	defer googleapi.CloseBody(res)
1827	if err := googleapi.CheckResponse(res); err != nil {
1828		return err
1829	}
1830	return nil
1831	// {
1832	//   "description": "Resets the event with the given ID for all players. This method is only available to user accounts for your developer console. Only draft events can be reset.",
1833	//   "flatPath": "games/v1management/events/{eventId}/resetForAllPlayers",
1834	//   "httpMethod": "POST",
1835	//   "id": "gamesManagement.events.resetForAllPlayers",
1836	//   "parameterOrder": [
1837	//     "eventId"
1838	//   ],
1839	//   "parameters": {
1840	//     "eventId": {
1841	//       "description": "The ID of the event.",
1842	//       "location": "path",
1843	//       "required": true,
1844	//       "type": "string"
1845	//     }
1846	//   },
1847	//   "path": "games/v1management/events/{eventId}/resetForAllPlayers",
1848	//   "scopes": [
1849	//     "https://www.googleapis.com/auth/games"
1850	//   ]
1851	// }
1852
1853}
1854
1855// method id "gamesManagement.events.resetMultipleForAllPlayers":
1856
1857type EventsResetMultipleForAllPlayersCall struct {
1858	s                                *Service
1859	eventsresetmultipleforallrequest *EventsResetMultipleForAllRequest
1860	urlParams_                       gensupport.URLParams
1861	ctx_                             context.Context
1862	header_                          http.Header
1863}
1864
1865// ResetMultipleForAllPlayers: Resets events with the given IDs for all
1866// players. This method is only available to user accounts for your
1867// developer console. Only draft events may be reset.
1868func (r *EventsService) ResetMultipleForAllPlayers(eventsresetmultipleforallrequest *EventsResetMultipleForAllRequest) *EventsResetMultipleForAllPlayersCall {
1869	c := &EventsResetMultipleForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1870	c.eventsresetmultipleforallrequest = eventsresetmultipleforallrequest
1871	return c
1872}
1873
1874// Fields allows partial responses to be retrieved. See
1875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1876// for more information.
1877func (c *EventsResetMultipleForAllPlayersCall) Fields(s ...googleapi.Field) *EventsResetMultipleForAllPlayersCall {
1878	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1879	return c
1880}
1881
1882// Context sets the context to be used in this call's Do method. Any
1883// pending HTTP request will be aborted if the provided context is
1884// canceled.
1885func (c *EventsResetMultipleForAllPlayersCall) Context(ctx context.Context) *EventsResetMultipleForAllPlayersCall {
1886	c.ctx_ = ctx
1887	return c
1888}
1889
1890// Header returns an http.Header that can be modified by the caller to
1891// add HTTP headers to the request.
1892func (c *EventsResetMultipleForAllPlayersCall) Header() http.Header {
1893	if c.header_ == nil {
1894		c.header_ = make(http.Header)
1895	}
1896	return c.header_
1897}
1898
1899func (c *EventsResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
1900	reqHeaders := make(http.Header)
1901	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
1902	for k, v := range c.header_ {
1903		reqHeaders[k] = v
1904	}
1905	reqHeaders.Set("User-Agent", c.s.userAgent())
1906	var body io.Reader = nil
1907	body, err := googleapi.WithoutDataWrapper.JSONReader(c.eventsresetmultipleforallrequest)
1908	if err != nil {
1909		return nil, err
1910	}
1911	reqHeaders.Set("Content-Type", "application/json")
1912	c.urlParams_.Set("alt", alt)
1913	c.urlParams_.Set("prettyPrint", "false")
1914	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/events/resetMultipleForAllPlayers")
1915	urls += "?" + c.urlParams_.Encode()
1916	req, err := http.NewRequest("POST", urls, body)
1917	if err != nil {
1918		return nil, err
1919	}
1920	req.Header = reqHeaders
1921	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1922}
1923
1924// Do executes the "gamesManagement.events.resetMultipleForAllPlayers" call.
1925func (c *EventsResetMultipleForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
1926	gensupport.SetOptions(c.urlParams_, opts...)
1927	res, err := c.doRequest("json")
1928	if err != nil {
1929		return err
1930	}
1931	defer googleapi.CloseBody(res)
1932	if err := googleapi.CheckResponse(res); err != nil {
1933		return err
1934	}
1935	return nil
1936	// {
1937	//   "description": "Resets events with the given IDs for all players. This method is only available to user accounts for your developer console. Only draft events may be reset.",
1938	//   "flatPath": "games/v1management/events/resetMultipleForAllPlayers",
1939	//   "httpMethod": "POST",
1940	//   "id": "gamesManagement.events.resetMultipleForAllPlayers",
1941	//   "parameterOrder": [],
1942	//   "parameters": {},
1943	//   "path": "games/v1management/events/resetMultipleForAllPlayers",
1944	//   "request": {
1945	//     "$ref": "EventsResetMultipleForAllRequest"
1946	//   },
1947	//   "scopes": [
1948	//     "https://www.googleapis.com/auth/games"
1949	//   ]
1950	// }
1951
1952}
1953
1954// method id "gamesManagement.players.hide":
1955
1956type PlayersHideCall struct {
1957	s             *Service
1958	applicationId string
1959	playerId      string
1960	urlParams_    gensupport.URLParams
1961	ctx_          context.Context
1962	header_       http.Header
1963}
1964
1965// Hide: Hide the given player's leaderboard scores from the given
1966// application. This method is only available to user accounts for your
1967// developer console.
1968func (r *PlayersService) Hide(applicationId string, playerId string) *PlayersHideCall {
1969	c := &PlayersHideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1970	c.applicationId = applicationId
1971	c.playerId = playerId
1972	return c
1973}
1974
1975// Fields allows partial responses to be retrieved. See
1976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1977// for more information.
1978func (c *PlayersHideCall) Fields(s ...googleapi.Field) *PlayersHideCall {
1979	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1980	return c
1981}
1982
1983// Context sets the context to be used in this call's Do method. Any
1984// pending HTTP request will be aborted if the provided context is
1985// canceled.
1986func (c *PlayersHideCall) Context(ctx context.Context) *PlayersHideCall {
1987	c.ctx_ = ctx
1988	return c
1989}
1990
1991// Header returns an http.Header that can be modified by the caller to
1992// add HTTP headers to the request.
1993func (c *PlayersHideCall) Header() http.Header {
1994	if c.header_ == nil {
1995		c.header_ = make(http.Header)
1996	}
1997	return c.header_
1998}
1999
2000func (c *PlayersHideCall) doRequest(alt string) (*http.Response, error) {
2001	reqHeaders := make(http.Header)
2002	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2003	for k, v := range c.header_ {
2004		reqHeaders[k] = v
2005	}
2006	reqHeaders.Set("User-Agent", c.s.userAgent())
2007	var body io.Reader = nil
2008	c.urlParams_.Set("alt", alt)
2009	c.urlParams_.Set("prettyPrint", "false")
2010	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/applications/{applicationId}/players/hidden/{playerId}")
2011	urls += "?" + c.urlParams_.Encode()
2012	req, err := http.NewRequest("POST", urls, body)
2013	if err != nil {
2014		return nil, err
2015	}
2016	req.Header = reqHeaders
2017	googleapi.Expand(req.URL, map[string]string{
2018		"applicationId": c.applicationId,
2019		"playerId":      c.playerId,
2020	})
2021	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2022}
2023
2024// Do executes the "gamesManagement.players.hide" call.
2025func (c *PlayersHideCall) Do(opts ...googleapi.CallOption) error {
2026	gensupport.SetOptions(c.urlParams_, opts...)
2027	res, err := c.doRequest("json")
2028	if err != nil {
2029		return err
2030	}
2031	defer googleapi.CloseBody(res)
2032	if err := googleapi.CheckResponse(res); err != nil {
2033		return err
2034	}
2035	return nil
2036	// {
2037	//   "description": "Hide the given player's leaderboard scores from the given application. This method is only available to user accounts for your developer console.",
2038	//   "flatPath": "games/v1management/applications/{applicationId}/players/hidden/{playerId}",
2039	//   "httpMethod": "POST",
2040	//   "id": "gamesManagement.players.hide",
2041	//   "parameterOrder": [
2042	//     "applicationId",
2043	//     "playerId"
2044	//   ],
2045	//   "parameters": {
2046	//     "applicationId": {
2047	//       "description": "The application ID from the Google Play developer console.",
2048	//       "location": "path",
2049	//       "required": true,
2050	//       "type": "string"
2051	//     },
2052	//     "playerId": {
2053	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
2054	//       "location": "path",
2055	//       "required": true,
2056	//       "type": "string"
2057	//     }
2058	//   },
2059	//   "path": "games/v1management/applications/{applicationId}/players/hidden/{playerId}",
2060	//   "scopes": [
2061	//     "https://www.googleapis.com/auth/games"
2062	//   ]
2063	// }
2064
2065}
2066
2067// method id "gamesManagement.players.unhide":
2068
2069type PlayersUnhideCall struct {
2070	s             *Service
2071	applicationId string
2072	playerId      string
2073	urlParams_    gensupport.URLParams
2074	ctx_          context.Context
2075	header_       http.Header
2076}
2077
2078// Unhide: Unhide the given player's leaderboard scores from the given
2079// application. This method is only available to user accounts for your
2080// developer console.
2081func (r *PlayersService) Unhide(applicationId string, playerId string) *PlayersUnhideCall {
2082	c := &PlayersUnhideCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2083	c.applicationId = applicationId
2084	c.playerId = playerId
2085	return c
2086}
2087
2088// Fields allows partial responses to be retrieved. See
2089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2090// for more information.
2091func (c *PlayersUnhideCall) Fields(s ...googleapi.Field) *PlayersUnhideCall {
2092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2093	return c
2094}
2095
2096// Context sets the context to be used in this call's Do method. Any
2097// pending HTTP request will be aborted if the provided context is
2098// canceled.
2099func (c *PlayersUnhideCall) Context(ctx context.Context) *PlayersUnhideCall {
2100	c.ctx_ = ctx
2101	return c
2102}
2103
2104// Header returns an http.Header that can be modified by the caller to
2105// add HTTP headers to the request.
2106func (c *PlayersUnhideCall) Header() http.Header {
2107	if c.header_ == nil {
2108		c.header_ = make(http.Header)
2109	}
2110	return c.header_
2111}
2112
2113func (c *PlayersUnhideCall) doRequest(alt string) (*http.Response, error) {
2114	reqHeaders := make(http.Header)
2115	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2116	for k, v := range c.header_ {
2117		reqHeaders[k] = v
2118	}
2119	reqHeaders.Set("User-Agent", c.s.userAgent())
2120	var body io.Reader = nil
2121	c.urlParams_.Set("alt", alt)
2122	c.urlParams_.Set("prettyPrint", "false")
2123	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/applications/{applicationId}/players/hidden/{playerId}")
2124	urls += "?" + c.urlParams_.Encode()
2125	req, err := http.NewRequest("DELETE", urls, body)
2126	if err != nil {
2127		return nil, err
2128	}
2129	req.Header = reqHeaders
2130	googleapi.Expand(req.URL, map[string]string{
2131		"applicationId": c.applicationId,
2132		"playerId":      c.playerId,
2133	})
2134	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2135}
2136
2137// Do executes the "gamesManagement.players.unhide" call.
2138func (c *PlayersUnhideCall) Do(opts ...googleapi.CallOption) error {
2139	gensupport.SetOptions(c.urlParams_, opts...)
2140	res, err := c.doRequest("json")
2141	if err != nil {
2142		return err
2143	}
2144	defer googleapi.CloseBody(res)
2145	if err := googleapi.CheckResponse(res); err != nil {
2146		return err
2147	}
2148	return nil
2149	// {
2150	//   "description": "Unhide the given player's leaderboard scores from the given application. This method is only available to user accounts for your developer console.",
2151	//   "flatPath": "games/v1management/applications/{applicationId}/players/hidden/{playerId}",
2152	//   "httpMethod": "DELETE",
2153	//   "id": "gamesManagement.players.unhide",
2154	//   "parameterOrder": [
2155	//     "applicationId",
2156	//     "playerId"
2157	//   ],
2158	//   "parameters": {
2159	//     "applicationId": {
2160	//       "description": "The application ID from the Google Play developer console.",
2161	//       "location": "path",
2162	//       "required": true,
2163	//       "type": "string"
2164	//     },
2165	//     "playerId": {
2166	//       "description": "A player ID. A value of `me` may be used in place of the authenticated player's ID.",
2167	//       "location": "path",
2168	//       "required": true,
2169	//       "type": "string"
2170	//     }
2171	//   },
2172	//   "path": "games/v1management/applications/{applicationId}/players/hidden/{playerId}",
2173	//   "scopes": [
2174	//     "https://www.googleapis.com/auth/games"
2175	//   ]
2176	// }
2177
2178}
2179
2180// method id "gamesManagement.scores.reset":
2181
2182type ScoresResetCall struct {
2183	s             *Service
2184	leaderboardId string
2185	urlParams_    gensupport.URLParams
2186	ctx_          context.Context
2187	header_       http.Header
2188}
2189
2190// Reset: Resets scores for the leaderboard with the given ID for the
2191// currently authenticated player. This method is only accessible to
2192// whitelisted tester accounts for your application.
2193func (r *ScoresService) Reset(leaderboardId string) *ScoresResetCall {
2194	c := &ScoresResetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2195	c.leaderboardId = leaderboardId
2196	return c
2197}
2198
2199// Fields allows partial responses to be retrieved. See
2200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2201// for more information.
2202func (c *ScoresResetCall) Fields(s ...googleapi.Field) *ScoresResetCall {
2203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2204	return c
2205}
2206
2207// Context sets the context to be used in this call's Do method. Any
2208// pending HTTP request will be aborted if the provided context is
2209// canceled.
2210func (c *ScoresResetCall) Context(ctx context.Context) *ScoresResetCall {
2211	c.ctx_ = ctx
2212	return c
2213}
2214
2215// Header returns an http.Header that can be modified by the caller to
2216// add HTTP headers to the request.
2217func (c *ScoresResetCall) Header() http.Header {
2218	if c.header_ == nil {
2219		c.header_ = make(http.Header)
2220	}
2221	return c.header_
2222}
2223
2224func (c *ScoresResetCall) doRequest(alt string) (*http.Response, error) {
2225	reqHeaders := make(http.Header)
2226	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2227	for k, v := range c.header_ {
2228		reqHeaders[k] = v
2229	}
2230	reqHeaders.Set("User-Agent", c.s.userAgent())
2231	var body io.Reader = nil
2232	c.urlParams_.Set("alt", alt)
2233	c.urlParams_.Set("prettyPrint", "false")
2234	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/leaderboards/{leaderboardId}/scores/reset")
2235	urls += "?" + c.urlParams_.Encode()
2236	req, err := http.NewRequest("POST", urls, body)
2237	if err != nil {
2238		return nil, err
2239	}
2240	req.Header = reqHeaders
2241	googleapi.Expand(req.URL, map[string]string{
2242		"leaderboardId": c.leaderboardId,
2243	})
2244	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2245}
2246
2247// Do executes the "gamesManagement.scores.reset" call.
2248// Exactly one of *PlayerScoreResetResponse or error will be non-nil.
2249// Any non-2xx status code is an error. Response headers are in either
2250// *PlayerScoreResetResponse.ServerResponse.Header or (if a response was
2251// returned at all) in error.(*googleapi.Error).Header. Use
2252// googleapi.IsNotModified to check whether the returned error was
2253// because http.StatusNotModified was returned.
2254func (c *ScoresResetCall) Do(opts ...googleapi.CallOption) (*PlayerScoreResetResponse, error) {
2255	gensupport.SetOptions(c.urlParams_, opts...)
2256	res, err := c.doRequest("json")
2257	if res != nil && res.StatusCode == http.StatusNotModified {
2258		if res.Body != nil {
2259			res.Body.Close()
2260		}
2261		return nil, &googleapi.Error{
2262			Code:   res.StatusCode,
2263			Header: res.Header,
2264		}
2265	}
2266	if err != nil {
2267		return nil, err
2268	}
2269	defer googleapi.CloseBody(res)
2270	if err := googleapi.CheckResponse(res); err != nil {
2271		return nil, err
2272	}
2273	ret := &PlayerScoreResetResponse{
2274		ServerResponse: googleapi.ServerResponse{
2275			Header:         res.Header,
2276			HTTPStatusCode: res.StatusCode,
2277		},
2278	}
2279	target := &ret
2280	if err := gensupport.DecodeResponse(target, res); err != nil {
2281		return nil, err
2282	}
2283	return ret, nil
2284	// {
2285	//   "description": "Resets scores for the leaderboard with the given ID for the currently authenticated player. This method is only accessible to whitelisted tester accounts for your application.",
2286	//   "flatPath": "games/v1management/leaderboards/{leaderboardId}/scores/reset",
2287	//   "httpMethod": "POST",
2288	//   "id": "gamesManagement.scores.reset",
2289	//   "parameterOrder": [
2290	//     "leaderboardId"
2291	//   ],
2292	//   "parameters": {
2293	//     "leaderboardId": {
2294	//       "description": "The ID of the leaderboard.",
2295	//       "location": "path",
2296	//       "required": true,
2297	//       "type": "string"
2298	//     }
2299	//   },
2300	//   "path": "games/v1management/leaderboards/{leaderboardId}/scores/reset",
2301	//   "response": {
2302	//     "$ref": "PlayerScoreResetResponse"
2303	//   },
2304	//   "scopes": [
2305	//     "https://www.googleapis.com/auth/games"
2306	//   ]
2307	// }
2308
2309}
2310
2311// method id "gamesManagement.scores.resetAll":
2312
2313type ScoresResetAllCall struct {
2314	s          *Service
2315	urlParams_ gensupport.URLParams
2316	ctx_       context.Context
2317	header_    http.Header
2318}
2319
2320// ResetAll: Resets all scores for all leaderboards for the currently
2321// authenticated players. This method is only accessible to whitelisted
2322// tester accounts for your application.
2323func (r *ScoresService) ResetAll() *ScoresResetAllCall {
2324	c := &ScoresResetAllCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2325	return c
2326}
2327
2328// Fields allows partial responses to be retrieved. See
2329// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2330// for more information.
2331func (c *ScoresResetAllCall) Fields(s ...googleapi.Field) *ScoresResetAllCall {
2332	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2333	return c
2334}
2335
2336// Context sets the context to be used in this call's Do method. Any
2337// pending HTTP request will be aborted if the provided context is
2338// canceled.
2339func (c *ScoresResetAllCall) Context(ctx context.Context) *ScoresResetAllCall {
2340	c.ctx_ = ctx
2341	return c
2342}
2343
2344// Header returns an http.Header that can be modified by the caller to
2345// add HTTP headers to the request.
2346func (c *ScoresResetAllCall) Header() http.Header {
2347	if c.header_ == nil {
2348		c.header_ = make(http.Header)
2349	}
2350	return c.header_
2351}
2352
2353func (c *ScoresResetAllCall) doRequest(alt string) (*http.Response, error) {
2354	reqHeaders := make(http.Header)
2355	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2356	for k, v := range c.header_ {
2357		reqHeaders[k] = v
2358	}
2359	reqHeaders.Set("User-Agent", c.s.userAgent())
2360	var body io.Reader = nil
2361	c.urlParams_.Set("alt", alt)
2362	c.urlParams_.Set("prettyPrint", "false")
2363	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/scores/reset")
2364	urls += "?" + c.urlParams_.Encode()
2365	req, err := http.NewRequest("POST", urls, body)
2366	if err != nil {
2367		return nil, err
2368	}
2369	req.Header = reqHeaders
2370	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2371}
2372
2373// Do executes the "gamesManagement.scores.resetAll" call.
2374// Exactly one of *PlayerScoreResetAllResponse or error will be non-nil.
2375// Any non-2xx status code is an error. Response headers are in either
2376// *PlayerScoreResetAllResponse.ServerResponse.Header or (if a response
2377// was returned at all) in error.(*googleapi.Error).Header. Use
2378// googleapi.IsNotModified to check whether the returned error was
2379// because http.StatusNotModified was returned.
2380func (c *ScoresResetAllCall) Do(opts ...googleapi.CallOption) (*PlayerScoreResetAllResponse, error) {
2381	gensupport.SetOptions(c.urlParams_, opts...)
2382	res, err := c.doRequest("json")
2383	if res != nil && res.StatusCode == http.StatusNotModified {
2384		if res.Body != nil {
2385			res.Body.Close()
2386		}
2387		return nil, &googleapi.Error{
2388			Code:   res.StatusCode,
2389			Header: res.Header,
2390		}
2391	}
2392	if err != nil {
2393		return nil, err
2394	}
2395	defer googleapi.CloseBody(res)
2396	if err := googleapi.CheckResponse(res); err != nil {
2397		return nil, err
2398	}
2399	ret := &PlayerScoreResetAllResponse{
2400		ServerResponse: googleapi.ServerResponse{
2401			Header:         res.Header,
2402			HTTPStatusCode: res.StatusCode,
2403		},
2404	}
2405	target := &ret
2406	if err := gensupport.DecodeResponse(target, res); err != nil {
2407		return nil, err
2408	}
2409	return ret, nil
2410	// {
2411	//   "description": "Resets all scores for all leaderboards for the currently authenticated players. This method is only accessible to whitelisted tester accounts for your application.",
2412	//   "flatPath": "games/v1management/scores/reset",
2413	//   "httpMethod": "POST",
2414	//   "id": "gamesManagement.scores.resetAll",
2415	//   "parameterOrder": [],
2416	//   "parameters": {},
2417	//   "path": "games/v1management/scores/reset",
2418	//   "response": {
2419	//     "$ref": "PlayerScoreResetAllResponse"
2420	//   },
2421	//   "scopes": [
2422	//     "https://www.googleapis.com/auth/games"
2423	//   ]
2424	// }
2425
2426}
2427
2428// method id "gamesManagement.scores.resetAllForAllPlayers":
2429
2430type ScoresResetAllForAllPlayersCall struct {
2431	s          *Service
2432	urlParams_ gensupport.URLParams
2433	ctx_       context.Context
2434	header_    http.Header
2435}
2436
2437// ResetAllForAllPlayers: Resets scores for all draft leaderboards for
2438// all players. This method is only available to user accounts for your
2439// developer console.
2440func (r *ScoresService) ResetAllForAllPlayers() *ScoresResetAllForAllPlayersCall {
2441	c := &ScoresResetAllForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2442	return c
2443}
2444
2445// Fields allows partial responses to be retrieved. See
2446// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2447// for more information.
2448func (c *ScoresResetAllForAllPlayersCall) Fields(s ...googleapi.Field) *ScoresResetAllForAllPlayersCall {
2449	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2450	return c
2451}
2452
2453// Context sets the context to be used in this call's Do method. Any
2454// pending HTTP request will be aborted if the provided context is
2455// canceled.
2456func (c *ScoresResetAllForAllPlayersCall) Context(ctx context.Context) *ScoresResetAllForAllPlayersCall {
2457	c.ctx_ = ctx
2458	return c
2459}
2460
2461// Header returns an http.Header that can be modified by the caller to
2462// add HTTP headers to the request.
2463func (c *ScoresResetAllForAllPlayersCall) Header() http.Header {
2464	if c.header_ == nil {
2465		c.header_ = make(http.Header)
2466	}
2467	return c.header_
2468}
2469
2470func (c *ScoresResetAllForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
2471	reqHeaders := make(http.Header)
2472	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2473	for k, v := range c.header_ {
2474		reqHeaders[k] = v
2475	}
2476	reqHeaders.Set("User-Agent", c.s.userAgent())
2477	var body io.Reader = nil
2478	c.urlParams_.Set("alt", alt)
2479	c.urlParams_.Set("prettyPrint", "false")
2480	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/scores/resetAllForAllPlayers")
2481	urls += "?" + c.urlParams_.Encode()
2482	req, err := http.NewRequest("POST", urls, body)
2483	if err != nil {
2484		return nil, err
2485	}
2486	req.Header = reqHeaders
2487	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2488}
2489
2490// Do executes the "gamesManagement.scores.resetAllForAllPlayers" call.
2491func (c *ScoresResetAllForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
2492	gensupport.SetOptions(c.urlParams_, opts...)
2493	res, err := c.doRequest("json")
2494	if err != nil {
2495		return err
2496	}
2497	defer googleapi.CloseBody(res)
2498	if err := googleapi.CheckResponse(res); err != nil {
2499		return err
2500	}
2501	return nil
2502	// {
2503	//   "description": "Resets scores for all draft leaderboards for all players. This method is only available to user accounts for your developer console.",
2504	//   "flatPath": "games/v1management/scores/resetAllForAllPlayers",
2505	//   "httpMethod": "POST",
2506	//   "id": "gamesManagement.scores.resetAllForAllPlayers",
2507	//   "parameterOrder": [],
2508	//   "parameters": {},
2509	//   "path": "games/v1management/scores/resetAllForAllPlayers",
2510	//   "scopes": [
2511	//     "https://www.googleapis.com/auth/games"
2512	//   ]
2513	// }
2514
2515}
2516
2517// method id "gamesManagement.scores.resetForAllPlayers":
2518
2519type ScoresResetForAllPlayersCall struct {
2520	s             *Service
2521	leaderboardId string
2522	urlParams_    gensupport.URLParams
2523	ctx_          context.Context
2524	header_       http.Header
2525}
2526
2527// ResetForAllPlayers: Resets scores for the leaderboard with the given
2528// ID for all players. This method is only available to user accounts
2529// for your developer console. Only draft leaderboards can be reset.
2530func (r *ScoresService) ResetForAllPlayers(leaderboardId string) *ScoresResetForAllPlayersCall {
2531	c := &ScoresResetForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2532	c.leaderboardId = leaderboardId
2533	return c
2534}
2535
2536// Fields allows partial responses to be retrieved. See
2537// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2538// for more information.
2539func (c *ScoresResetForAllPlayersCall) Fields(s ...googleapi.Field) *ScoresResetForAllPlayersCall {
2540	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2541	return c
2542}
2543
2544// Context sets the context to be used in this call's Do method. Any
2545// pending HTTP request will be aborted if the provided context is
2546// canceled.
2547func (c *ScoresResetForAllPlayersCall) Context(ctx context.Context) *ScoresResetForAllPlayersCall {
2548	c.ctx_ = ctx
2549	return c
2550}
2551
2552// Header returns an http.Header that can be modified by the caller to
2553// add HTTP headers to the request.
2554func (c *ScoresResetForAllPlayersCall) Header() http.Header {
2555	if c.header_ == nil {
2556		c.header_ = make(http.Header)
2557	}
2558	return c.header_
2559}
2560
2561func (c *ScoresResetForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
2562	reqHeaders := make(http.Header)
2563	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2564	for k, v := range c.header_ {
2565		reqHeaders[k] = v
2566	}
2567	reqHeaders.Set("User-Agent", c.s.userAgent())
2568	var body io.Reader = nil
2569	c.urlParams_.Set("alt", alt)
2570	c.urlParams_.Set("prettyPrint", "false")
2571	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/leaderboards/{leaderboardId}/scores/resetForAllPlayers")
2572	urls += "?" + c.urlParams_.Encode()
2573	req, err := http.NewRequest("POST", urls, body)
2574	if err != nil {
2575		return nil, err
2576	}
2577	req.Header = reqHeaders
2578	googleapi.Expand(req.URL, map[string]string{
2579		"leaderboardId": c.leaderboardId,
2580	})
2581	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2582}
2583
2584// Do executes the "gamesManagement.scores.resetForAllPlayers" call.
2585func (c *ScoresResetForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
2586	gensupport.SetOptions(c.urlParams_, opts...)
2587	res, err := c.doRequest("json")
2588	if err != nil {
2589		return err
2590	}
2591	defer googleapi.CloseBody(res)
2592	if err := googleapi.CheckResponse(res); err != nil {
2593		return err
2594	}
2595	return nil
2596	// {
2597	//   "description": "Resets scores for the leaderboard with the given ID for all players. This method is only available to user accounts for your developer console. Only draft leaderboards can be reset.",
2598	//   "flatPath": "games/v1management/leaderboards/{leaderboardId}/scores/resetForAllPlayers",
2599	//   "httpMethod": "POST",
2600	//   "id": "gamesManagement.scores.resetForAllPlayers",
2601	//   "parameterOrder": [
2602	//     "leaderboardId"
2603	//   ],
2604	//   "parameters": {
2605	//     "leaderboardId": {
2606	//       "description": "The ID of the leaderboard.",
2607	//       "location": "path",
2608	//       "required": true,
2609	//       "type": "string"
2610	//     }
2611	//   },
2612	//   "path": "games/v1management/leaderboards/{leaderboardId}/scores/resetForAllPlayers",
2613	//   "scopes": [
2614	//     "https://www.googleapis.com/auth/games"
2615	//   ]
2616	// }
2617
2618}
2619
2620// method id "gamesManagement.scores.resetMultipleForAllPlayers":
2621
2622type ScoresResetMultipleForAllPlayersCall struct {
2623	s                                *Service
2624	scoresresetmultipleforallrequest *ScoresResetMultipleForAllRequest
2625	urlParams_                       gensupport.URLParams
2626	ctx_                             context.Context
2627	header_                          http.Header
2628}
2629
2630// ResetMultipleForAllPlayers: Resets scores for the leaderboards with
2631// the given IDs for all players. This method is only available to user
2632// accounts for your developer console. Only draft leaderboards may be
2633// reset.
2634func (r *ScoresService) ResetMultipleForAllPlayers(scoresresetmultipleforallrequest *ScoresResetMultipleForAllRequest) *ScoresResetMultipleForAllPlayersCall {
2635	c := &ScoresResetMultipleForAllPlayersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2636	c.scoresresetmultipleforallrequest = scoresresetmultipleforallrequest
2637	return c
2638}
2639
2640// Fields allows partial responses to be retrieved. See
2641// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2642// for more information.
2643func (c *ScoresResetMultipleForAllPlayersCall) Fields(s ...googleapi.Field) *ScoresResetMultipleForAllPlayersCall {
2644	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2645	return c
2646}
2647
2648// Context sets the context to be used in this call's Do method. Any
2649// pending HTTP request will be aborted if the provided context is
2650// canceled.
2651func (c *ScoresResetMultipleForAllPlayersCall) Context(ctx context.Context) *ScoresResetMultipleForAllPlayersCall {
2652	c.ctx_ = ctx
2653	return c
2654}
2655
2656// Header returns an http.Header that can be modified by the caller to
2657// add HTTP headers to the request.
2658func (c *ScoresResetMultipleForAllPlayersCall) Header() http.Header {
2659	if c.header_ == nil {
2660		c.header_ = make(http.Header)
2661	}
2662	return c.header_
2663}
2664
2665func (c *ScoresResetMultipleForAllPlayersCall) doRequest(alt string) (*http.Response, error) {
2666	reqHeaders := make(http.Header)
2667	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201009")
2668	for k, v := range c.header_ {
2669		reqHeaders[k] = v
2670	}
2671	reqHeaders.Set("User-Agent", c.s.userAgent())
2672	var body io.Reader = nil
2673	body, err := googleapi.WithoutDataWrapper.JSONReader(c.scoresresetmultipleforallrequest)
2674	if err != nil {
2675		return nil, err
2676	}
2677	reqHeaders.Set("Content-Type", "application/json")
2678	c.urlParams_.Set("alt", alt)
2679	c.urlParams_.Set("prettyPrint", "false")
2680	urls := googleapi.ResolveRelative(c.s.BasePath, "games/v1management/scores/resetMultipleForAllPlayers")
2681	urls += "?" + c.urlParams_.Encode()
2682	req, err := http.NewRequest("POST", urls, body)
2683	if err != nil {
2684		return nil, err
2685	}
2686	req.Header = reqHeaders
2687	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2688}
2689
2690// Do executes the "gamesManagement.scores.resetMultipleForAllPlayers" call.
2691func (c *ScoresResetMultipleForAllPlayersCall) Do(opts ...googleapi.CallOption) error {
2692	gensupport.SetOptions(c.urlParams_, opts...)
2693	res, err := c.doRequest("json")
2694	if err != nil {
2695		return err
2696	}
2697	defer googleapi.CloseBody(res)
2698	if err := googleapi.CheckResponse(res); err != nil {
2699		return err
2700	}
2701	return nil
2702	// {
2703	//   "description": "Resets scores for the leaderboards with the given IDs for all players. This method is only available to user accounts for your developer console. Only draft leaderboards may be reset.",
2704	//   "flatPath": "games/v1management/scores/resetMultipleForAllPlayers",
2705	//   "httpMethod": "POST",
2706	//   "id": "gamesManagement.scores.resetMultipleForAllPlayers",
2707	//   "parameterOrder": [],
2708	//   "parameters": {},
2709	//   "path": "games/v1management/scores/resetMultipleForAllPlayers",
2710	//   "request": {
2711	//     "$ref": "ScoresResetMultipleForAllRequest"
2712	//   },
2713	//   "scopes": [
2714	//     "https://www.googleapis.com/auth/games"
2715	//   ]
2716	// }
2717
2718}
2719