PluginProbe
UpdraftPlus: WP Backup & Migration Plugin / 1.16.5
UpdraftPlus: WP Backup & Migration Plugin v1.16.5
1.26.7 1.26.6 1.26.5 1.26.4 1.26.3 1.9.19 1.9.25 1.9.26 1.9.30 1.9.31 1.9.32 1.9.4 1.9.40 1.9.41 1.9.42 1.9.43 1.9.44 1.9.45 1.9.46 1.9.5 1.9.50 1.9.51 1.9.60 1.9.62 1.9.63 All 371 releases
updraftplus / includes / Google / Service / Licensing.php

Licensing.php in UpdraftPlus: WP Backup & Migration Plugin 1.16.5, at includes/Google/Service/Licensing.php

479 lines 14.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Copyright 2010 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
18 /**
19 * Service definition for Licensing (v1).
20 *
21 * <p>
22 * Licensing API to view and manage license for your domain.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://developers.google.com/google-apps/licensing/" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31 class Google_Service_Licensing extends Google_Service
32 {
33 /** View and manage Google Apps licenses for your domain. */
34 const APPS_LICENSING =
35 "https://www.googleapis.com/auth/apps.licensing";
36
37 public $licenseAssignments;
38
39
40 /**
41 * Constructs the internal representation of the Licensing service.
42 *
43 * @param Google_Client $client
44 */
45 public function __construct(Google_Client $client)
46 {
47 parent::__construct($client);
48 $this->servicePath = 'apps/licensing/v1/product/';
49 $this->version = 'v1';
50 $this->serviceName = 'licensing';
51
52 $this->licenseAssignments = new Google_Service_Licensing_LicenseAssignments_Resource(
53 $this,
54 $this->serviceName,
55 'licenseAssignments',
56 array(
57 'methods' => array(
58 'delete' => array(
59 'path' => '{productId}/sku/{skuId}/user/{userId}',
60 'httpMethod' => 'DELETE',
61 'parameters' => array(
62 'productId' => array(
63 'location' => 'path',
64 'type' => 'string',
65 'required' => true,
66 ),
67 'skuId' => array(
68 'location' => 'path',
69 'type' => 'string',
70 'required' => true,
71 ),
72 'userId' => array(
73 'location' => 'path',
74 'type' => 'string',
75 'required' => true,
76 ),
77 ),
78 ),'get' => array(
79 'path' => '{productId}/sku/{skuId}/user/{userId}',
80 'httpMethod' => 'GET',
81 'parameters' => array(
82 'productId' => array(
83 'location' => 'path',
84 'type' => 'string',
85 'required' => true,
86 ),
87 'skuId' => array(
88 'location' => 'path',
89 'type' => 'string',
90 'required' => true,
91 ),
92 'userId' => array(
93 'location' => 'path',
94 'type' => 'string',
95 'required' => true,
96 ),
97 ),
98 ),'insert' => array(
99 'path' => '{productId}/sku/{skuId}/user',
100 'httpMethod' => 'POST',
101 'parameters' => array(
102 'productId' => array(
103 'location' => 'path',
104 'type' => 'string',
105 'required' => true,
106 ),
107 'skuId' => array(
108 'location' => 'path',
109 'type' => 'string',
110 'required' => true,
111 ),
112 ),
113 ),'listForProduct' => array(
114 'path' => '{productId}/users',
115 'httpMethod' => 'GET',
116 'parameters' => array(
117 'productId' => array(
118 'location' => 'path',
119 'type' => 'string',
120 'required' => true,
121 ),
122 'customerId' => array(
123 'location' => 'query',
124 'type' => 'string',
125 'required' => true,
126 ),
127 'pageToken' => array(
128 'location' => 'query',
129 'type' => 'string',
130 ),
131 'maxResults' => array(
132 'location' => 'query',
133 'type' => 'integer',
134 ),
135 ),
136 ),'listForProductAndSku' => array(
137 'path' => '{productId}/sku/{skuId}/users',
138 'httpMethod' => 'GET',
139 'parameters' => array(
140 'productId' => array(
141 'location' => 'path',
142 'type' => 'string',
143 'required' => true,
144 ),
145 'skuId' => array(
146 'location' => 'path',
147 'type' => 'string',
148 'required' => true,
149 ),
150 'customerId' => array(
151 'location' => 'query',
152 'type' => 'string',
153 'required' => true,
154 ),
155 'pageToken' => array(
156 'location' => 'query',
157 'type' => 'string',
158 ),
159 'maxResults' => array(
160 'location' => 'query',
161 'type' => 'integer',
162 ),
163 ),
164 ),'patch' => array(
165 'path' => '{productId}/sku/{skuId}/user/{userId}',
166 'httpMethod' => 'PATCH',
167 'parameters' => array(
168 'productId' => array(
169 'location' => 'path',
170 'type' => 'string',
171 'required' => true,
172 ),
173 'skuId' => array(
174 'location' => 'path',
175 'type' => 'string',
176 'required' => true,
177 ),
178 'userId' => array(
179 'location' => 'path',
180 'type' => 'string',
181 'required' => true,
182 ),
183 ),
184 ),'update' => array(
185 'path' => '{productId}/sku/{skuId}/user/{userId}',
186 'httpMethod' => 'PUT',
187 'parameters' => array(
188 'productId' => array(
189 'location' => 'path',
190 'type' => 'string',
191 'required' => true,
192 ),
193 'skuId' => array(
194 'location' => 'path',
195 'type' => 'string',
196 'required' => true,
197 ),
198 'userId' => array(
199 'location' => 'path',
200 'type' => 'string',
201 'required' => true,
202 ),
203 ),
204 ),
205 )
206 )
207 );
208 }
209 }
210
211
212 /**
213 * The "licenseAssignments" collection of methods.
214 * Typical usage is:
215 * <code>
216 * $licensingService = new Google_Service_Licensing(...);
217 * $licenseAssignments = $licensingService->licenseAssignments;
218 * </code>
219 */
220 class Google_Service_Licensing_LicenseAssignments_Resource extends Google_Service_Resource
221 {
222
223 /**
224 * Revoke License. (licenseAssignments.delete)
225 *
226 * @param string $productId Name for product
227 * @param string $skuId Name for sku
228 * @param string $userId email id or unique Id of the user
229 * @param array $optParams Optional parameters.
230 */
231 public function delete($productId, $skuId, $userId, $optParams = array())
232 {
233 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId);
234 $params = array_merge($params, $optParams);
235 return $this->call('delete', array($params));
236 }
237
238 /**
239 * Get license assignment of a particular product and sku for a user
240 * (licenseAssignments.get)
241 *
242 * @param string $productId Name for product
243 * @param string $skuId Name for sku
244 * @param string $userId email id or unique Id of the user
245 * @param array $optParams Optional parameters.
246 * @return Google_Service_Licensing_LicenseAssignment
247 */
248 public function get($productId, $skuId, $userId, $optParams = array())
249 {
250 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId);
251 $params = array_merge($params, $optParams);
252 return $this->call('get', array($params), "Google_Service_Licensing_LicenseAssignment");
253 }
254
255 /**
256 * Assign License. (licenseAssignments.insert)
257 *
258 * @param string $productId Name for product
259 * @param string $skuId Name for sku
260 * @param Google_LicenseAssignmentInsert $postBody
261 * @param array $optParams Optional parameters.
262 * @return Google_Service_Licensing_LicenseAssignment
263 */
264 public function insert($productId, $skuId, Google_Service_Licensing_LicenseAssignmentInsert $postBody, $optParams = array())
265 {
266 $params = array('productId' => $productId, 'skuId' => $skuId, 'postBody' => $postBody);
267 $params = array_merge($params, $optParams);
268 return $this->call('insert', array($params), "Google_Service_Licensing_LicenseAssignment");
269 }
270
271 /**
272 * List license assignments for given product of the customer.
273 * (licenseAssignments.listForProduct)
274 *
275 * @param string $productId Name for product
276 * @param string $customerId CustomerId represents the customer for whom
277 * licenseassignments are queried
278 * @param array $optParams Optional parameters.
279 *
280 * @opt_param string pageToken Token to fetch the next page.Optional. By default
281 * server will return first page
282 * @opt_param string maxResults Maximum number of campaigns to return at one
283 * time. Must be positive. Optional. Default value is 100.
284 * @return Google_Service_Licensing_LicenseAssignmentList
285 */
286 public function listForProduct($productId, $customerId, $optParams = array())
287 {
288 $params = array('productId' => $productId, 'customerId' => $customerId);
289 $params = array_merge($params, $optParams);
290 return $this->call('listForProduct', array($params), "Google_Service_Licensing_LicenseAssignmentList");
291 }
292
293 /**
294 * List license assignments for given product and sku of the customer.
295 * (licenseAssignments.listForProductAndSku)
296 *
297 * @param string $productId Name for product
298 * @param string $skuId Name for sku
299 * @param string $customerId CustomerId represents the customer for whom
300 * licenseassignments are queried
301 * @param array $optParams Optional parameters.
302 *
303 * @opt_param string pageToken Token to fetch the next page.Optional. By default
304 * server will return first page
305 * @opt_param string maxResults Maximum number of campaigns to return at one
306 * time. Must be positive. Optional. Default value is 100.
307 * @return Google_Service_Licensing_LicenseAssignmentList
308 */
309 public function listForProductAndSku($productId, $skuId, $customerId, $optParams = array())
310 {
311 $params = array('productId' => $productId, 'skuId' => $skuId, 'customerId' => $customerId);
312 $params = array_merge($params, $optParams);
313 return $this->call('listForProductAndSku', array($params), "Google_Service_Licensing_LicenseAssignmentList");
314 }
315
316 /**
317 * Assign License. This method supports patch semantics.
318 * (licenseAssignments.patch)
319 *
320 * @param string $productId Name for product
321 * @param string $skuId Name for sku for which license would be revoked
322 * @param string $userId email id or unique Id of the user
323 * @param Google_LicenseAssignment $postBody
324 * @param array $optParams Optional parameters.
325 * @return Google_Service_Licensing_LicenseAssignment
326 */
327 public function patch($productId, $skuId, $userId, Google_Service_Licensing_LicenseAssignment $postBody, $optParams = array())
328 {
329 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody);
330 $params = array_merge($params, $optParams);
331 return $this->call('patch', array($params), "Google_Service_Licensing_LicenseAssignment");
332 }
333
334 /**
335 * Assign License. (licenseAssignments.update)
336 *
337 * @param string $productId Name for product
338 * @param string $skuId Name for sku for which license would be revoked
339 * @param string $userId email id or unique Id of the user
340 * @param Google_LicenseAssignment $postBody
341 * @param array $optParams Optional parameters.
342 * @return Google_Service_Licensing_LicenseAssignment
343 */
344 public function update($productId, $skuId, $userId, Google_Service_Licensing_LicenseAssignment $postBody, $optParams = array())
345 {
346 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody);
347 $params = array_merge($params, $optParams);
348 return $this->call('update', array($params), "Google_Service_Licensing_LicenseAssignment");
349 }
350 }
351
352
353
354
355 class Google_Service_Licensing_LicenseAssignment extends Google_Model
356 {
357 protected $internal_gapi_mappings = array(
358 );
359 public $etags;
360 public $kind;
361 public $productId;
362 public $selfLink;
363 public $skuId;
364 public $userId;
365
366
367 public function setEtags($etags)
368 {
369 $this->etags = $etags;
370 }
371 public function getEtags()
372 {
373 return $this->etags;
374 }
375 public function setKind($kind)
376 {
377 $this->kind = $kind;
378 }
379 public function getKind()
380 {
381 return $this->kind;
382 }
383 public function setProductId($productId)
384 {
385 $this->productId = $productId;
386 }
387 public function getProductId()
388 {
389 return $this->productId;
390 }
391 public function setSelfLink($selfLink)
392 {
393 $this->selfLink = $selfLink;
394 }
395 public function getSelfLink()
396 {
397 return $this->selfLink;
398 }
399 public function setSkuId($skuId)
400 {
401 $this->skuId = $skuId;
402 }
403 public function getSkuId()
404 {
405 return $this->skuId;
406 }
407 public function setUserId($userId)
408 {
409 $this->userId = $userId;
410 }
411 public function getUserId()
412 {
413 return $this->userId;
414 }
415 }
416
417 class Google_Service_Licensing_LicenseAssignmentInsert extends Google_Model
418 {
419 protected $internal_gapi_mappings = array(
420 );
421 public $userId;
422
423
424 public function setUserId($userId)
425 {
426 $this->userId = $userId;
427 }
428 public function getUserId()
429 {
430 return $this->userId;
431 }
432 }
433
434 class Google_Service_Licensing_LicenseAssignmentList extends Google_Collection
435 {
436 protected $collection_key = 'items';
437 protected $internal_gapi_mappings = array(
438 );
439 public $etag;
440 protected $itemsType = 'Google_Service_Licensing_LicenseAssignment';
441 protected $itemsDataType = 'array';
442 public $kind;
443 public $nextPageToken;
444
445
446 public function setEtag($etag)
447 {
448 $this->etag = $etag;
449 }
450 public function getEtag()
451 {
452 return $this->etag;
453 }
454 public function setItems($items)
455 {
456 $this->items = $items;
457 }
458 public function getItems()
459 {
460 return $this->items;
461 }
462 public function setKind($kind)
463 {
464 $this->kind = $kind;
465 }
466 public function getKind()
467 {
468 return $this->kind;
469 }
470 public function setNextPageToken($nextPageToken)
471 {
472 $this->nextPageToken = $nextPageToken;
473 }
474 public function getNextPageToken()
475 {
476 return $this->nextPageToken;
477 }
478 }
479