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; 19 20use Google\Client; 21 22/** 23 * Service definition for Licensing (v1). 24 * 25 * <p> 26 * The Google Enterprise License Manager API's allows you to license apps for 27 * all the users of a domain managed by you.</p> 28 * 29 * <p> 30 * For more information about this service, see the API 31 * <a href="https://developers.google.com/admin-sdk/licensing/" target="_blank">Documentation</a> 32 * </p> 33 * 34 * @author Google, Inc. 35 */ 36class Licensing extends \Google\Service 37{ 38 /** View and manage G Suite licenses for your domain. */ 39 const APPS_LICENSING = 40 "https://www.googleapis.com/auth/apps.licensing"; 41 42 public $licenseAssignments; 43 44 /** 45 * Constructs the internal representation of the Licensing service. 46 * 47 * @param Client|array $clientOrConfig The client used to deliver requests, or a 48 * config array to pass to a new Client instance. 49 * @param string $rootUrl The root URL used for requests to the service. 50 */ 51 public function __construct($clientOrConfig = [], $rootUrl = null) 52 { 53 parent::__construct($clientOrConfig); 54 $this->rootUrl = $rootUrl ?: 'https://licensing.googleapis.com/'; 55 $this->servicePath = ''; 56 $this->batchPath = 'batch'; 57 $this->version = 'v1'; 58 $this->serviceName = 'licensing'; 59 60 $this->licenseAssignments = new Licensing\Resource\LicenseAssignments( 61 $this, 62 $this->serviceName, 63 'licenseAssignments', 64 [ 65 'methods' => [ 66 'delete' => [ 67 'path' => 'apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}', 68 'httpMethod' => 'DELETE', 69 'parameters' => [ 70 'productId' => [ 71 'location' => 'path', 72 'type' => 'string', 73 'required' => true, 74 ], 75 'skuId' => [ 76 'location' => 'path', 77 'type' => 'string', 78 'required' => true, 79 ], 80 'userId' => [ 81 'location' => 'path', 82 'type' => 'string', 83 'required' => true, 84 ], 85 ], 86 ],'get' => [ 87 'path' => 'apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}', 88 'httpMethod' => 'GET', 89 'parameters' => [ 90 'productId' => [ 91 'location' => 'path', 92 'type' => 'string', 93 'required' => true, 94 ], 95 'skuId' => [ 96 'location' => 'path', 97 'type' => 'string', 98 'required' => true, 99 ], 100 'userId' => [ 101 'location' => 'path', 102 'type' => 'string', 103 'required' => true, 104 ], 105 ], 106 ],'insert' => [ 107 'path' => 'apps/licensing/v1/product/{productId}/sku/{skuId}/user', 108 'httpMethod' => 'POST', 109 'parameters' => [ 110 'productId' => [ 111 'location' => 'path', 112 'type' => 'string', 113 'required' => true, 114 ], 115 'skuId' => [ 116 'location' => 'path', 117 'type' => 'string', 118 'required' => true, 119 ], 120 ], 121 ],'listForProduct' => [ 122 'path' => 'apps/licensing/v1/product/{productId}/users', 123 'httpMethod' => 'GET', 124 'parameters' => [ 125 'productId' => [ 126 'location' => 'path', 127 'type' => 'string', 128 'required' => true, 129 ], 130 'customerId' => [ 131 'location' => 'query', 132 'type' => 'string', 133 'required' => true, 134 ], 135 'maxResults' => [ 136 'location' => 'query', 137 'type' => 'integer', 138 ], 139 'pageToken' => [ 140 'location' => 'query', 141 'type' => 'string', 142 ], 143 ], 144 ],'listForProductAndSku' => [ 145 'path' => 'apps/licensing/v1/product/{productId}/sku/{skuId}/users', 146 'httpMethod' => 'GET', 147 'parameters' => [ 148 'productId' => [ 149 'location' => 'path', 150 'type' => 'string', 151 'required' => true, 152 ], 153 'skuId' => [ 154 'location' => 'path', 155 'type' => 'string', 156 'required' => true, 157 ], 158 'customerId' => [ 159 'location' => 'query', 160 'type' => 'string', 161 'required' => true, 162 ], 163 'maxResults' => [ 164 'location' => 'query', 165 'type' => 'integer', 166 ], 167 'pageToken' => [ 168 'location' => 'query', 169 'type' => 'string', 170 ], 171 ], 172 ],'patch' => [ 173 'path' => 'apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}', 174 'httpMethod' => 'PATCH', 175 'parameters' => [ 176 'productId' => [ 177 'location' => 'path', 178 'type' => 'string', 179 'required' => true, 180 ], 181 'skuId' => [ 182 'location' => 'path', 183 'type' => 'string', 184 'required' => true, 185 ], 186 'userId' => [ 187 'location' => 'path', 188 'type' => 'string', 189 'required' => true, 190 ], 191 ], 192 ],'update' => [ 193 'path' => 'apps/licensing/v1/product/{productId}/sku/{skuId}/user/{userId}', 194 'httpMethod' => 'PUT', 195 'parameters' => [ 196 'productId' => [ 197 'location' => 'path', 198 'type' => 'string', 199 'required' => true, 200 ], 201 'skuId' => [ 202 'location' => 'path', 203 'type' => 'string', 204 'required' => true, 205 ], 206 'userId' => [ 207 'location' => 'path', 208 'type' => 'string', 209 'required' => true, 210 ], 211 ], 212 ], 213 ] 214 ] 215 ); 216 } 217} 218 219// Adding a class alias for backwards compatibility with the previous class name. 220class_alias(Licensing::class, 'Google_Service_Licensing'); 221