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\AndroidEnterprise\Resource;
19
20use Google\Service\AndroidEnterprise\GroupLicense;
21use Google\Service\AndroidEnterprise\GroupLicensesListResponse;
22
23/**
24 * The "grouplicenses" collection of methods.
25 * Typical usage is:
26 *  <code>
27 *   $androidenterpriseService = new Google\Service\AndroidEnterprise(...);
28 *   $grouplicenses = $androidenterpriseService->grouplicenses;
29 *  </code>
30 */
31class Grouplicenses extends \Google\Service\Resource
32{
33  /**
34   * Retrieves details of an enterprise's group license for a product.
35   * (grouplicenses.get)
36   *
37   * @param string $enterpriseId The ID of the enterprise.
38   * @param string $groupLicenseId The ID of the product the group license is for,
39   * e.g. "app:com.google.android.gm".
40   * @param array $optParams Optional parameters.
41   * @return GroupLicense
42   */
43  public function get($enterpriseId, $groupLicenseId, $optParams = [])
44  {
45    $params = ['enterpriseId' => $enterpriseId, 'groupLicenseId' => $groupLicenseId];
46    $params = array_merge($params, $optParams);
47    return $this->call('get', [$params], GroupLicense::class);
48  }
49  /**
50   * Retrieves IDs of all products for which the enterprise has a group license.
51   * (grouplicenses.listGrouplicenses)
52   *
53   * @param string $enterpriseId The ID of the enterprise.
54   * @param array $optParams Optional parameters.
55   * @return GroupLicensesListResponse
56   */
57  public function listGrouplicenses($enterpriseId, $optParams = [])
58  {
59    $params = ['enterpriseId' => $enterpriseId];
60    $params = array_merge($params, $optParams);
61    return $this->call('list', [$params], GroupLicensesListResponse::class);
62  }
63}
64
65// Adding a class alias for backwards compatibility with the previous class name.
66class_alias(Grouplicenses::class, 'Google_Service_AndroidEnterprise_Resource_Grouplicenses');
67