1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\GamesManagement\Resource;
19
20use Google\Service\GamesManagement\AchievementResetAllResponse;
21use Google\Service\GamesManagement\AchievementResetMultipleForAllRequest;
22use Google\Service\GamesManagement\AchievementResetResponse;
23
24/**
25 * The "achievements" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $gamesManagementService = new Google\Service\GamesManagement(...);
29 *   $achievements = $gamesManagementService->achievements;
30 *  </code>
31 */
32class Achievements extends \Google\Service\Resource
33{
34  /**
35   * Resets the achievement with the given ID for the currently authenticated
36   * player. This method is only accessible to whitelisted tester accounts for
37   * your application. (achievements.reset)
38   *
39   * @param string $achievementId The ID of the achievement used by this method.
40   * @param array $optParams Optional parameters.
41   * @return AchievementResetResponse
42   */
43  public function reset($achievementId, $optParams = [])
44  {
45    $params = ['achievementId' => $achievementId];
46    $params = array_merge($params, $optParams);
47    return $this->call('reset', [$params], AchievementResetResponse::class);
48  }
49  /**
50   * Resets all achievements for the currently authenticated player for your
51   * application. This method is only accessible to whitelisted tester accounts
52   * for your application. (achievements.resetAll)
53   *
54   * @param array $optParams Optional parameters.
55   * @return AchievementResetAllResponse
56   */
57  public function resetAll($optParams = [])
58  {
59    $params = [];
60    $params = array_merge($params, $optParams);
61    return $this->call('resetAll', [$params], AchievementResetAllResponse::class);
62  }
63  /**
64   * Resets all draft achievements for all players. This method is only available
65   * to user accounts for your developer console.
66   * (achievements.resetAllForAllPlayers)
67   *
68   * @param array $optParams Optional parameters.
69   */
70  public function resetAllForAllPlayers($optParams = [])
71  {
72    $params = [];
73    $params = array_merge($params, $optParams);
74    return $this->call('resetAllForAllPlayers', [$params]);
75  }
76  /**
77   * Resets the achievement with the given ID for all players. This method is only
78   * available to user accounts for your developer console. Only draft
79   * achievements can be reset. (achievements.resetForAllPlayers)
80   *
81   * @param string $achievementId The ID of the achievement used by this method.
82   * @param array $optParams Optional parameters.
83   */
84  public function resetForAllPlayers($achievementId, $optParams = [])
85  {
86    $params = ['achievementId' => $achievementId];
87    $params = array_merge($params, $optParams);
88    return $this->call('resetForAllPlayers', [$params]);
89  }
90  /**
91   * Resets achievements with the given IDs for all players. This method is only
92   * available to user accounts for your developer console. Only draft
93   * achievements may be reset. (achievements.resetMultipleForAllPlayers)
94   *
95   * @param AchievementResetMultipleForAllRequest $postBody
96   * @param array $optParams Optional parameters.
97   */
98  public function resetMultipleForAllPlayers(AchievementResetMultipleForAllRequest $postBody, $optParams = [])
99  {
100    $params = ['postBody' => $postBody];
101    $params = array_merge($params, $optParams);
102    return $this->call('resetMultipleForAllPlayers', [$params]);
103  }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(Achievements::class, 'Google_Service_GamesManagement_Resource_Achievements');
108