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