PluginProbe
Authorizer / 2.6.10
Authorizer v2.6.10
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 / Licensing.php

Licensing.php in Authorizer 2.6.10, at vendor/google-api-php-client/src/Google/Service/Licensing.php

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