...

Source file src/google.golang.org/api/games/v1/games-gen.go

Documentation: google.golang.org/api/games/v1

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

View as plain text