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;
19
20use Google\Client;
21
22/**
23 * Service definition for GamesManagement (v1management).
24 *
25 * <p>
26 * The Google Play Game Management API allows developers to manage resources
27 * from the Google Play Game service.</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/games/" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class GamesManagement extends \Google\Service
37{
38  /** Create, edit, and delete your Google Play Games activity. */
39  const GAMES =
40      "https://www.googleapis.com/auth/games";
41
42  public $achievements;
43  public $applications;
44  public $events;
45  public $players;
46  public $scores;
47
48  /**
49   * Constructs the internal representation of the GamesManagement service.
50   *
51   * @param Client|array $clientOrConfig The client used to deliver requests, or a
52   *                                     config array to pass to a new Client instance.
53   * @param string $rootUrl The root URL used for requests to the service.
54   */
55  public function __construct($clientOrConfig = [], $rootUrl = null)
56  {
57    parent::__construct($clientOrConfig);
58    $this->rootUrl = $rootUrl ?: 'https://gamesmanagement.googleapis.com/';
59    $this->servicePath = '';
60    $this->batchPath = 'batch';
61    $this->version = 'v1management';
62    $this->serviceName = 'gamesManagement';
63
64    $this->achievements = new GamesManagement\Resource\Achievements(
65        $this,
66        $this->serviceName,
67        'achievements',
68        [
69          'methods' => [
70            'reset' => [
71              'path' => 'games/v1management/achievements/{achievementId}/reset',
72              'httpMethod' => 'POST',
73              'parameters' => [
74                'achievementId' => [
75                  'location' => 'path',
76                  'type' => 'string',
77                  'required' => true,
78                ],
79              ],
80            ],'resetAll' => [
81              'path' => 'games/v1management/achievements/reset',
82              'httpMethod' => 'POST',
83              'parameters' => [],
84            ],'resetAllForAllPlayers' => [
85              'path' => 'games/v1management/achievements/resetAllForAllPlayers',
86              'httpMethod' => 'POST',
87              'parameters' => [],
88            ],'resetForAllPlayers' => [
89              'path' => 'games/v1management/achievements/{achievementId}/resetForAllPlayers',
90              'httpMethod' => 'POST',
91              'parameters' => [
92                'achievementId' => [
93                  'location' => 'path',
94                  'type' => 'string',
95                  'required' => true,
96                ],
97              ],
98            ],'resetMultipleForAllPlayers' => [
99              'path' => 'games/v1management/achievements/resetMultipleForAllPlayers',
100              'httpMethod' => 'POST',
101              'parameters' => [],
102            ],
103          ]
104        ]
105    );
106    $this->applications = new GamesManagement\Resource\Applications(
107        $this,
108        $this->serviceName,
109        'applications',
110        [
111          'methods' => [
112            'listHidden' => [
113              'path' => 'games/v1management/applications/{applicationId}/players/hidden',
114              'httpMethod' => 'GET',
115              'parameters' => [
116                'applicationId' => [
117                  'location' => 'path',
118                  'type' => 'string',
119                  'required' => true,
120                ],
121                'maxResults' => [
122                  'location' => 'query',
123                  'type' => 'integer',
124                ],
125                'pageToken' => [
126                  'location' => 'query',
127                  'type' => 'string',
128                ],
129              ],
130            ],
131          ]
132        ]
133    );
134    $this->events = new GamesManagement\Resource\Events(
135        $this,
136        $this->serviceName,
137        'events',
138        [
139          'methods' => [
140            'reset' => [
141              'path' => 'games/v1management/events/{eventId}/reset',
142              'httpMethod' => 'POST',
143              'parameters' => [
144                'eventId' => [
145                  'location' => 'path',
146                  'type' => 'string',
147                  'required' => true,
148                ],
149              ],
150            ],'resetAll' => [
151              'path' => 'games/v1management/events/reset',
152              'httpMethod' => 'POST',
153              'parameters' => [],
154            ],'resetAllForAllPlayers' => [
155              'path' => 'games/v1management/events/resetAllForAllPlayers',
156              'httpMethod' => 'POST',
157              'parameters' => [],
158            ],'resetForAllPlayers' => [
159              'path' => 'games/v1management/events/{eventId}/resetForAllPlayers',
160              'httpMethod' => 'POST',
161              'parameters' => [
162                'eventId' => [
163                  'location' => 'path',
164                  'type' => 'string',
165                  'required' => true,
166                ],
167              ],
168            ],'resetMultipleForAllPlayers' => [
169              'path' => 'games/v1management/events/resetMultipleForAllPlayers',
170              'httpMethod' => 'POST',
171              'parameters' => [],
172            ],
173          ]
174        ]
175    );
176    $this->players = new GamesManagement\Resource\Players(
177        $this,
178        $this->serviceName,
179        'players',
180        [
181          'methods' => [
182            'hide' => [
183              'path' => 'games/v1management/applications/{applicationId}/players/hidden/{playerId}',
184              'httpMethod' => 'POST',
185              'parameters' => [
186                'applicationId' => [
187                  'location' => 'path',
188                  'type' => 'string',
189                  'required' => true,
190                ],
191                'playerId' => [
192                  'location' => 'path',
193                  'type' => 'string',
194                  'required' => true,
195                ],
196              ],
197            ],'unhide' => [
198              'path' => 'games/v1management/applications/{applicationId}/players/hidden/{playerId}',
199              'httpMethod' => 'DELETE',
200              'parameters' => [
201                'applicationId' => [
202                  'location' => 'path',
203                  'type' => 'string',
204                  'required' => true,
205                ],
206                'playerId' => [
207                  'location' => 'path',
208                  'type' => 'string',
209                  'required' => true,
210                ],
211              ],
212            ],
213          ]
214        ]
215    );
216    $this->scores = new GamesManagement\Resource\Scores(
217        $this,
218        $this->serviceName,
219        'scores',
220        [
221          'methods' => [
222            'reset' => [
223              'path' => 'games/v1management/leaderboards/{leaderboardId}/scores/reset',
224              'httpMethod' => 'POST',
225              'parameters' => [
226                'leaderboardId' => [
227                  'location' => 'path',
228                  'type' => 'string',
229                  'required' => true,
230                ],
231              ],
232            ],'resetAll' => [
233              'path' => 'games/v1management/scores/reset',
234              'httpMethod' => 'POST',
235              'parameters' => [],
236            ],'resetAllForAllPlayers' => [
237              'path' => 'games/v1management/scores/resetAllForAllPlayers',
238              'httpMethod' => 'POST',
239              'parameters' => [],
240            ],'resetForAllPlayers' => [
241              'path' => 'games/v1management/leaderboards/{leaderboardId}/scores/resetForAllPlayers',
242              'httpMethod' => 'POST',
243              'parameters' => [
244                'leaderboardId' => [
245                  'location' => 'path',
246                  'type' => 'string',
247                  'required' => true,
248                ],
249              ],
250            ],'resetMultipleForAllPlayers' => [
251              'path' => 'games/v1management/scores/resetMultipleForAllPlayers',
252              'httpMethod' => 'POST',
253              'parameters' => [],
254            ],
255          ]
256        ]
257    );
258  }
259}
260
261// Adding a class alias for backwards compatibility with the previous class name.
262class_alias(GamesManagement::class, 'Google_Service_GamesManagement');
263