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\GamesConfiguration\Resource;
19
20use Google\Service\GamesConfiguration\AchievementConfiguration;
21use Google\Service\GamesConfiguration\AchievementConfigurationListResponse;
22
23/**
24 * The "achievementConfigurations" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $gamesConfigurationService = new Google\Service\GamesConfiguration(...);
28 *   $achievementConfigurations = $gamesConfigurationService->achievementConfigurations;
29 *  </code>
30 */
31class AchievementConfigurations extends \Google\Service\Resource
32{
33  /**
34   * Delete the achievement configuration with the given ID.
35   * (achievementConfigurations.delete)
36   *
37   * @param string $achievementId The ID of the achievement used by this method.
38   * @param array $optParams Optional parameters.
39   */
40  public function delete($achievementId, $optParams = [])
41  {
42    $params = ['achievementId' => $achievementId];
43    $params = array_merge($params, $optParams);
44    return $this->call('delete', [$params]);
45  }
46  /**
47   * Retrieves the metadata of the achievement configuration with the given ID.
48   * (achievementConfigurations.get)
49   *
50   * @param string $achievementId The ID of the achievement used by this method.
51   * @param array $optParams Optional parameters.
52   * @return AchievementConfiguration
53   */
54  public function get($achievementId, $optParams = [])
55  {
56    $params = ['achievementId' => $achievementId];
57    $params = array_merge($params, $optParams);
58    return $this->call('get', [$params], AchievementConfiguration::class);
59  }
60  /**
61   * Insert a new achievement configuration in this application.
62   * (achievementConfigurations.insert)
63   *
64   * @param string $applicationId The application ID from the Google Play
65   * developer console.
66   * @param AchievementConfiguration $postBody
67   * @param array $optParams Optional parameters.
68   * @return AchievementConfiguration
69   */
70  public function insert($applicationId, AchievementConfiguration $postBody, $optParams = [])
71  {
72    $params = ['applicationId' => $applicationId, 'postBody' => $postBody];
73    $params = array_merge($params, $optParams);
74    return $this->call('insert', [$params], AchievementConfiguration::class);
75  }
76  /**
77   * Returns a list of the achievement configurations in this application.
78   * (achievementConfigurations.listAchievementConfigurations)
79   *
80   * @param string $applicationId The application ID from the Google Play
81   * developer console.
82   * @param array $optParams Optional parameters.
83   *
84   * @opt_param int maxResults The maximum number of resource configurations to
85   * return in the response, used for paging. For any response, the actual number
86   * of resources returned may be less than the specified `maxResults`.
87   * @opt_param string pageToken The token returned by the previous request.
88   * @return AchievementConfigurationListResponse
89   */
90  public function listAchievementConfigurations($applicationId, $optParams = [])
91  {
92    $params = ['applicationId' => $applicationId];
93    $params = array_merge($params, $optParams);
94    return $this->call('list', [$params], AchievementConfigurationListResponse::class);
95  }
96  /**
97   * Update the metadata of the achievement configuration with the given ID.
98   * (achievementConfigurations.update)
99   *
100   * @param string $achievementId The ID of the achievement used by this method.
101   * @param AchievementConfiguration $postBody
102   * @param array $optParams Optional parameters.
103   * @return AchievementConfiguration
104   */
105  public function update($achievementId, AchievementConfiguration $postBody, $optParams = [])
106  {
107    $params = ['achievementId' => $achievementId, 'postBody' => $postBody];
108    $params = array_merge($params, $optParams);
109    return $this->call('update', [$params], AchievementConfiguration::class);
110  }
111}
112
113// Adding a class alias for backwards compatibility with the previous class name.
114class_alias(AchievementConfigurations::class, 'Google_Service_GamesConfiguration_Resource_AchievementConfigurations');
115