PluginProbe
Authorizer / 2.8.0
Authorizer v2.8.0
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / vendor / google-api-php-client / src / Google / Service / AppState.php

AppState.php in Authorizer 2.8.0, at vendor/google-api-php-client/src/Google/Service/AppState.php

368 lines 10.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 * use this file except in compliance with the License. You may obtain a copy of
5 * the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 * License for the specific language governing permissions and limitations under
13 * the License.
14 */
15
16 /**
17 * Service definition for AppState (v1).
18 *
19 * <p>
20 * The Google App State API.</p>
21 *
22 * <p>
23 * For more information about this service, see the API
24 * <a href="https://developers.google.com/games/services/web/api/states" target="_blank">Documentation</a>
25 * </p>
26 *
27 * @author Google, Inc.
28 */
29 class Google_Service_AppState extends Google_Service
30 {
31 /** View and manage your data for this application. */
32 const APPSTATE =
33 "https://www.googleapis.com/auth/appstate";
34
35 public $states;
36
37
38 /**
39 * Constructs the internal representation of the AppState service.
40 *
41 * @param Google_Client $client
42 */
43 public function __construct(Google_Client $client)
44 {
45 parent::__construct($client);
46 $this->rootUrl = 'https://www.googleapis.com/';
47 $this->servicePath = 'appstate/v1/';
48 $this->version = 'v1';
49 $this->serviceName = 'appstate';
50
51 $this->states = new Google_Service_AppState_States_Resource(
52 $this,
53 $this->serviceName,
54 'states',
55 array(
56 'methods' => array(
57 'clear' => array(
58 'path' => 'states/{stateKey}/clear',
59 'httpMethod' => 'POST',
60 'parameters' => array(
61 'stateKey' => array(
62 'location' => 'path',
63 'type' => 'integer',
64 'required' => true,
65 ),
66 'currentDataVersion' => array(
67 'location' => 'query',
68 'type' => 'string',
69 ),
70 ),
71 ),'delete' => array(
72 'path' => 'states/{stateKey}',
73 'httpMethod' => 'DELETE',
74 'parameters' => array(
75 'stateKey' => array(
76 'location' => 'path',
77 'type' => 'integer',
78 'required' => true,
79 ),
80 ),
81 ),'get' => array(
82 'path' => 'states/{stateKey}',
83 'httpMethod' => 'GET',
84 'parameters' => array(
85 'stateKey' => array(
86 'location' => 'path',
87 'type' => 'integer',
88 'required' => true,
89 ),
90 ),
91 ),'list' => array(
92 'path' => 'states',
93 'httpMethod' => 'GET',
94 'parameters' => array(
95 'includeData' => array(
96 'location' => 'query',
97 'type' => 'boolean',
98 ),
99 ),
100 ),'update' => array(
101 'path' => 'states/{stateKey}',
102 'httpMethod' => 'PUT',
103 'parameters' => array(
104 'stateKey' => array(
105 'location' => 'path',
106 'type' => 'integer',
107 'required' => true,
108 ),
109 'currentStateVersion' => array(
110 'location' => 'query',
111 'type' => 'string',
112 ),
113 ),
114 ),
115 )
116 )
117 );
118 }
119 }
120
121
122 /**
123 * The "states" collection of methods.
124 * Typical usage is:
125 * <code>
126 * $appstateService = new Google_Service_AppState(...);
127 * $states = $appstateService->states;
128 * </code>
129 */
130 class Google_Service_AppState_States_Resource extends Google_Service_Resource
131 {
132
133 /**
134 * Clears (sets to empty) the data for the passed key if and only if the passed
135 * version matches the currently stored version. This method results in a
136 * conflict error on version mismatch. (states.clear)
137 *
138 * @param int $stateKey The key for the data to be retrieved.
139 * @param array $optParams Optional parameters.
140 *
141 * @opt_param string currentDataVersion The version of the data to be cleared.
142 * Version strings are returned by the server.
143 * @return Google_Service_AppState_WriteResult
144 */
145 public function clear($stateKey, $optParams = array())
146 {
147 $params = array('stateKey' => $stateKey);
148 $params = array_merge($params, $optParams);
149 return $this->call('clear', array($params), "Google_Service_AppState_WriteResult");
150 }
151
152 /**
153 * Deletes a key and the data associated with it. The key is removed and no
154 * longer counts against the key quota. Note that since this method is not safe
155 * in the face of concurrent modifications, it should only be used for
156 * development and testing purposes. Invoking this method in shipping code can
157 * result in data loss and data corruption. (states.delete)
158 *
159 * @param int $stateKey The key for the data to be retrieved.
160 * @param array $optParams Optional parameters.
161 */
162 public function delete($stateKey, $optParams = array())
163 {
164 $params = array('stateKey' => $stateKey);
165 $params = array_merge($params, $optParams);
166 return $this->call('delete', array($params));
167 }
168
169 /**
170 * Retrieves the data corresponding to the passed key. If the key does not exist
171 * on the server, an HTTP 404 will be returned. (states.get)
172 *
173 * @param int $stateKey The key for the data to be retrieved.
174 * @param array $optParams Optional parameters.
175 * @return Google_Service_AppState_GetResponse
176 */
177 public function get($stateKey, $optParams = array())
178 {
179 $params = array('stateKey' => $stateKey);
180 $params = array_merge($params, $optParams);
181 return $this->call('get', array($params), "Google_Service_AppState_GetResponse");
182 }
183
184 /**
185 * Lists all the states keys, and optionally the state data. (states.listStates)
186 *
187 * @param array $optParams Optional parameters.
188 *
189 * @opt_param bool includeData Whether to include the full data in addition to
190 * the version number
191 * @return Google_Service_AppState_ListResponse
192 */
193 public function listStates($optParams = array())
194 {
195 $params = array();
196 $params = array_merge($params, $optParams);
197 return $this->call('list', array($params), "Google_Service_AppState_ListResponse");
198 }
199
200 /**
201 * Update the data associated with the input key if and only if the passed
202 * version matches the currently stored version. This method is safe in the face
203 * of concurrent writes. Maximum per-key size is 128KB. (states.update)
204 *
205 * @param int $stateKey The key for the data to be retrieved.
206 * @param Google_UpdateRequest $postBody
207 * @param array $optParams Optional parameters.
208 *
209 * @opt_param string currentStateVersion The version of the app state your
210 * application is attempting to update. If this does not match the current
211 * version, this method will return a conflict error. If there is no data stored
212 * on the server for this key, the update will succeed irrespective of the value
213 * of this parameter.
214 * @return Google_Service_AppState_WriteResult
215 */
216 public function update($stateKey, Google_Service_AppState_UpdateRequest $postBody, $optParams = array())
217 {
218 $params = array('stateKey' => $stateKey, 'postBody' => $postBody);
219 $params = array_merge($params, $optParams);
220 return $this->call('update', array($params), "Google_Service_AppState_WriteResult");
221 }
222 }
223
224
225
226
227 class Google_Service_AppState_GetResponse extends Google_Model
228 {
229 protected $internal_gapi_mappings = array(
230 );
231 public $currentStateVersion;
232 public $data;
233 public $kind;
234 public $stateKey;
235
236
237 public function setCurrentStateVersion($currentStateVersion)
238 {
239 $this->currentStateVersion = $currentStateVersion;
240 }
241 public function getCurrentStateVersion()
242 {
243 return $this->currentStateVersion;
244 }
245 public function setData($data)
246 {
247 $this->data = $data;
248 }
249 public function getData()
250 {
251 return $this->data;
252 }
253 public function setKind($kind)
254 {
255 $this->kind = $kind;
256 }
257 public function getKind()
258 {
259 return $this->kind;
260 }
261 public function setStateKey($stateKey)
262 {
263 $this->stateKey = $stateKey;
264 }
265 public function getStateKey()
266 {
267 return $this->stateKey;
268 }
269 }
270
271 class Google_Service_AppState_ListResponse extends Google_Collection
272 {
273 protected $collection_key = 'items';
274 protected $internal_gapi_mappings = array(
275 );
276 protected $itemsType = 'Google_Service_AppState_GetResponse';
277 protected $itemsDataType = 'array';
278 public $kind;
279 public $maximumKeyCount;
280
281
282 public function setItems($items)
283 {
284 $this->items = $items;
285 }
286 public function getItems()
287 {
288 return $this->items;
289 }
290 public function setKind($kind)
291 {
292 $this->kind = $kind;
293 }
294 public function getKind()
295 {
296 return $this->kind;
297 }
298 public function setMaximumKeyCount($maximumKeyCount)
299 {
300 $this->maximumKeyCount = $maximumKeyCount;
301 }
302 public function getMaximumKeyCount()
303 {
304 return $this->maximumKeyCount;
305 }
306 }
307
308 class Google_Service_AppState_UpdateRequest extends Google_Model
309 {
310 protected $internal_gapi_mappings = array(
311 );
312 public $data;
313 public $kind;
314
315
316 public function setData($data)
317 {
318 $this->data = $data;
319 }
320 public function getData()
321 {
322 return $this->data;
323 }
324 public function setKind($kind)
325 {
326 $this->kind = $kind;
327 }
328 public function getKind()
329 {
330 return $this->kind;
331 }
332 }
333
334 class Google_Service_AppState_WriteResult extends Google_Model
335 {
336 protected $internal_gapi_mappings = array(
337 );
338 public $currentStateVersion;
339 public $kind;
340 public $stateKey;
341
342
343 public function setCurrentStateVersion($currentStateVersion)
344 {
345 $this->currentStateVersion = $currentStateVersion;
346 }
347 public function getCurrentStateVersion()
348 {
349 return $this->currentStateVersion;
350 }
351 public function setKind($kind)
352 {
353 $this->kind = $kind;
354 }
355 public function getKind()
356 {
357 return $this->kind;
358 }
359 public function setStateKey($stateKey)
360 {
361 $this->stateKey = $stateKey;
362 }
363 public function getStateKey()
364 {
365 return $this->stateKey;
366 }
367 }
368