[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
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. 23 * </p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="https://developers.google.com/google-apps/licensing/" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32 class Google_Service_Licensing extends Google_Service 33 { 34 35 36 public $licenseAssignments; 37 38 39 /** 40 * Constructs the internal representation of the Licensing service. 41 * 42 * @param Google_Client $client 43 */ 44 public function __construct(Google_Client $client) 45 { 46 parent::__construct($client); 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 'pageToken' => array( 127 'location' => 'query', 128 'type' => 'string', 129 ), 130 'maxResults' => array( 131 'location' => 'query', 132 'type' => 'integer', 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 'pageToken' => array( 155 'location' => 'query', 156 'type' => 'string', 157 ), 158 'maxResults' => array( 159 'location' => 'query', 160 'type' => 'integer', 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 226 * Name for product 227 * @param string $skuId 228 * Name for sku 229 * @param string $userId 230 * email id or unique Id of the user 231 * @param array $optParams Optional parameters. 232 */ 233 public function delete($productId, $skuId, $userId, $optParams = array()) 234 { 235 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId); 236 $params = array_merge($params, $optParams); 237 return $this->call('delete', array($params)); 238 } 239 /** 240 * Get license assignment of a particular product and sku for a user 241 * (licenseAssignments.get) 242 * 243 * @param string $productId 244 * Name for product 245 * @param string $skuId 246 * Name for sku 247 * @param string $userId 248 * email id or unique Id of the user 249 * @param array $optParams Optional parameters. 250 * @return Google_Service_Licensing_LicenseAssignment 251 */ 252 public function get($productId, $skuId, $userId, $optParams = array()) 253 { 254 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId); 255 $params = array_merge($params, $optParams); 256 return $this->call('get', array($params), "Google_Service_Licensing_LicenseAssignment"); 257 } 258 /** 259 * Assign License. (licenseAssignments.insert) 260 * 261 * @param string $productId 262 * Name for product 263 * @param string $skuId 264 * Name for sku 265 * @param Google_LicenseAssignmentInsert $postBody 266 * @param array $optParams Optional parameters. 267 * @return Google_Service_Licensing_LicenseAssignment 268 */ 269 public function insert($productId, $skuId, Google_Service_Licensing_LicenseAssignmentInsert $postBody, $optParams = array()) 270 { 271 $params = array('productId' => $productId, 'skuId' => $skuId, 'postBody' => $postBody); 272 $params = array_merge($params, $optParams); 273 return $this->call('insert', array($params), "Google_Service_Licensing_LicenseAssignment"); 274 } 275 /** 276 * List license assignments for given product of the customer. 277 * (licenseAssignments.listForProduct) 278 * 279 * @param string $productId 280 * Name for product 281 * @param string $customerId 282 * CustomerId represents the customer for whom licenseassignments are queried 283 * @param array $optParams Optional parameters. 284 * 285 * @opt_param string pageToken 286 * Token to fetch the next page.Optional. By default server will return first page 287 * @opt_param string maxResults 288 * Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 289 * 100. 290 * @return Google_Service_Licensing_LicenseAssignmentList 291 */ 292 public function listForProduct($productId, $customerId, $optParams = array()) 293 { 294 $params = array('productId' => $productId, 'customerId' => $customerId); 295 $params = array_merge($params, $optParams); 296 return $this->call('listForProduct', array($params), "Google_Service_Licensing_LicenseAssignmentList"); 297 } 298 /** 299 * List license assignments for given product and sku of the customer. 300 * (licenseAssignments.listForProductAndSku) 301 * 302 * @param string $productId 303 * Name for product 304 * @param string $skuId 305 * Name for sku 306 * @param string $customerId 307 * CustomerId represents the customer for whom licenseassignments are queried 308 * @param array $optParams Optional parameters. 309 * 310 * @opt_param string pageToken 311 * Token to fetch the next page.Optional. By default server will return first page 312 * @opt_param string maxResults 313 * Maximum number of campaigns to return at one time. Must be positive. Optional. Default value is 314 * 100. 315 * @return Google_Service_Licensing_LicenseAssignmentList 316 */ 317 public function listForProductAndSku($productId, $skuId, $customerId, $optParams = array()) 318 { 319 $params = array('productId' => $productId, 'skuId' => $skuId, 'customerId' => $customerId); 320 $params = array_merge($params, $optParams); 321 return $this->call('listForProductAndSku', array($params), "Google_Service_Licensing_LicenseAssignmentList"); 322 } 323 /** 324 * Assign License. This method supports patch semantics. 325 * (licenseAssignments.patch) 326 * 327 * @param string $productId 328 * Name for product 329 * @param string $skuId 330 * Name for sku for which license would be revoked 331 * @param string $userId 332 * email id or unique Id of the user 333 * @param Google_LicenseAssignment $postBody 334 * @param array $optParams Optional parameters. 335 * @return Google_Service_Licensing_LicenseAssignment 336 */ 337 public function patch($productId, $skuId, $userId, Google_Service_Licensing_LicenseAssignment $postBody, $optParams = array()) 338 { 339 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody); 340 $params = array_merge($params, $optParams); 341 return $this->call('patch', array($params), "Google_Service_Licensing_LicenseAssignment"); 342 } 343 /** 344 * Assign License. (licenseAssignments.update) 345 * 346 * @param string $productId 347 * Name for product 348 * @param string $skuId 349 * Name for sku for which license would be revoked 350 * @param string $userId 351 * email id or unique Id of the user 352 * @param Google_LicenseAssignment $postBody 353 * @param array $optParams Optional parameters. 354 * @return Google_Service_Licensing_LicenseAssignment 355 */ 356 public function update($productId, $skuId, $userId, Google_Service_Licensing_LicenseAssignment $postBody, $optParams = array()) 357 { 358 $params = array('productId' => $productId, 'skuId' => $skuId, 'userId' => $userId, 'postBody' => $postBody); 359 $params = array_merge($params, $optParams); 360 return $this->call('update', array($params), "Google_Service_Licensing_LicenseAssignment"); 361 } 362 } 363 364 365 366 367 class Google_Service_Licensing_LicenseAssignment extends Google_Model 368 { 369 public $etags; 370 public $kind; 371 public $productId; 372 public $selfLink; 373 public $skuId; 374 public $userId; 375 376 public function setEtags($etags) 377 { 378 $this->etags = $etags; 379 } 380 381 public function getEtags() 382 { 383 return $this->etags; 384 } 385 386 public function setKind($kind) 387 { 388 $this->kind = $kind; 389 } 390 391 public function getKind() 392 { 393 return $this->kind; 394 } 395 396 public function setProductId($productId) 397 { 398 $this->productId = $productId; 399 } 400 401 public function getProductId() 402 { 403 return $this->productId; 404 } 405 406 public function setSelfLink($selfLink) 407 { 408 $this->selfLink = $selfLink; 409 } 410 411 public function getSelfLink() 412 { 413 return $this->selfLink; 414 } 415 416 public function setSkuId($skuId) 417 { 418 $this->skuId = $skuId; 419 } 420 421 public function getSkuId() 422 { 423 return $this->skuId; 424 } 425 426 public function setUserId($userId) 427 { 428 $this->userId = $userId; 429 } 430 431 public function getUserId() 432 { 433 return $this->userId; 434 } 435 } 436 437 class Google_Service_Licensing_LicenseAssignmentInsert extends Google_Model 438 { 439 public $userId; 440 441 public function setUserId($userId) 442 { 443 $this->userId = $userId; 444 } 445 446 public function getUserId() 447 { 448 return $this->userId; 449 } 450 } 451 452 class Google_Service_Licensing_LicenseAssignmentList extends Google_Collection 453 { 454 protected $collection_key = 'items'; 455 public $etag; 456 protected $itemsType = 'Google_Service_Licensing_LicenseAssignment'; 457 protected $itemsDataType = 'array'; 458 public $kind; 459 public $nextPageToken; 460 461 public function setEtag($etag) 462 { 463 $this->etag = $etag; 464 } 465 466 public function getEtag() 467 { 468 return $this->etag; 469 } 470 471 public function setItems($items) 472 { 473 $this->items = $items; 474 } 475 476 public function getItems() 477 { 478 return $this->items; 479 } 480 481 public function setKind($kind) 482 { 483 $this->kind = $kind; 484 } 485 486 public function getKind() 487 { 488 return $this->kind; 489 } 490 491 public function setNextPageToken($nextPageToken) 492 { 493 $this->nextPageToken = $nextPageToken; 494 } 495 496 public function getNextPageToken() 497 { 498 return $this->nextPageToken; 499 } 500 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |