AndroidManagement.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for AndroidManagement (v1).
  21. *
  22. * <p>
  23. * The Android Management API provides remote enterprise management of Android
  24. * devices and apps.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/android/management" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class AndroidManagement extends \Google\Service
  34. {
  35. /** Manage Android devices and apps for your customers. */
  36. const ANDROIDMANAGEMENT =
  37. "https://www.googleapis.com/auth/androidmanagement";
  38. public $enterprises;
  39. public $enterprises_applications;
  40. public $enterprises_devices;
  41. public $enterprises_devices_operations;
  42. public $enterprises_enrollmentTokens;
  43. public $enterprises_policies;
  44. public $enterprises_webApps;
  45. public $enterprises_webTokens;
  46. public $signupUrls;
  47. /**
  48. * Constructs the internal representation of the AndroidManagement service.
  49. *
  50. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  51. * config array to pass to a new Client instance.
  52. * @param string $rootUrl The root URL used for requests to the service.
  53. */
  54. public function __construct($clientOrConfig = [], $rootUrl = null)
  55. {
  56. parent::__construct($clientOrConfig);
  57. $this->rootUrl = $rootUrl ?: 'https://androidmanagement.googleapis.com/';
  58. $this->servicePath = '';
  59. $this->batchPath = 'batch';
  60. $this->version = 'v1';
  61. $this->serviceName = 'androidmanagement';
  62. $this->enterprises = new AndroidManagement\Resource\Enterprises(
  63. $this,
  64. $this->serviceName,
  65. 'enterprises',
  66. [
  67. 'methods' => [
  68. 'create' => [
  69. 'path' => 'v1/enterprises',
  70. 'httpMethod' => 'POST',
  71. 'parameters' => [
  72. 'agreementAccepted' => [
  73. 'location' => 'query',
  74. 'type' => 'boolean',
  75. ],
  76. 'enterpriseToken' => [
  77. 'location' => 'query',
  78. 'type' => 'string',
  79. ],
  80. 'projectId' => [
  81. 'location' => 'query',
  82. 'type' => 'string',
  83. ],
  84. 'signupUrlName' => [
  85. 'location' => 'query',
  86. 'type' => 'string',
  87. ],
  88. ],
  89. ],'delete' => [
  90. 'path' => 'v1/{+name}',
  91. 'httpMethod' => 'DELETE',
  92. 'parameters' => [
  93. 'name' => [
  94. 'location' => 'path',
  95. 'type' => 'string',
  96. 'required' => true,
  97. ],
  98. ],
  99. ],'get' => [
  100. 'path' => 'v1/{+name}',
  101. 'httpMethod' => 'GET',
  102. 'parameters' => [
  103. 'name' => [
  104. 'location' => 'path',
  105. 'type' => 'string',
  106. 'required' => true,
  107. ],
  108. ],
  109. ],'list' => [
  110. 'path' => 'v1/enterprises',
  111. 'httpMethod' => 'GET',
  112. 'parameters' => [
  113. 'pageSize' => [
  114. 'location' => 'query',
  115. 'type' => 'integer',
  116. ],
  117. 'pageToken' => [
  118. 'location' => 'query',
  119. 'type' => 'string',
  120. ],
  121. 'projectId' => [
  122. 'location' => 'query',
  123. 'type' => 'string',
  124. ],
  125. 'view' => [
  126. 'location' => 'query',
  127. 'type' => 'string',
  128. ],
  129. ],
  130. ],'patch' => [
  131. 'path' => 'v1/{+name}',
  132. 'httpMethod' => 'PATCH',
  133. 'parameters' => [
  134. 'name' => [
  135. 'location' => 'path',
  136. 'type' => 'string',
  137. 'required' => true,
  138. ],
  139. 'updateMask' => [
  140. 'location' => 'query',
  141. 'type' => 'string',
  142. ],
  143. ],
  144. ],
  145. ]
  146. ]
  147. );
  148. $this->enterprises_applications = new AndroidManagement\Resource\EnterprisesApplications(
  149. $this,
  150. $this->serviceName,
  151. 'applications',
  152. [
  153. 'methods' => [
  154. 'get' => [
  155. 'path' => 'v1/{+name}',
  156. 'httpMethod' => 'GET',
  157. 'parameters' => [
  158. 'name' => [
  159. 'location' => 'path',
  160. 'type' => 'string',
  161. 'required' => true,
  162. ],
  163. 'languageCode' => [
  164. 'location' => 'query',
  165. 'type' => 'string',
  166. ],
  167. ],
  168. ],
  169. ]
  170. ]
  171. );
  172. $this->enterprises_devices = new AndroidManagement\Resource\EnterprisesDevices(
  173. $this,
  174. $this->serviceName,
  175. 'devices',
  176. [
  177. 'methods' => [
  178. 'delete' => [
  179. 'path' => 'v1/{+name}',
  180. 'httpMethod' => 'DELETE',
  181. 'parameters' => [
  182. 'name' => [
  183. 'location' => 'path',
  184. 'type' => 'string',
  185. 'required' => true,
  186. ],
  187. 'wipeDataFlags' => [
  188. 'location' => 'query',
  189. 'type' => 'string',
  190. 'repeated' => true,
  191. ],
  192. 'wipeReasonMessage' => [
  193. 'location' => 'query',
  194. 'type' => 'string',
  195. ],
  196. ],
  197. ],'get' => [
  198. 'path' => 'v1/{+name}',
  199. 'httpMethod' => 'GET',
  200. 'parameters' => [
  201. 'name' => [
  202. 'location' => 'path',
  203. 'type' => 'string',
  204. 'required' => true,
  205. ],
  206. ],
  207. ],'issueCommand' => [
  208. 'path' => 'v1/{+name}:issueCommand',
  209. 'httpMethod' => 'POST',
  210. 'parameters' => [
  211. 'name' => [
  212. 'location' => 'path',
  213. 'type' => 'string',
  214. 'required' => true,
  215. ],
  216. ],
  217. ],'list' => [
  218. 'path' => 'v1/{+parent}/devices',
  219. 'httpMethod' => 'GET',
  220. 'parameters' => [
  221. 'parent' => [
  222. 'location' => 'path',
  223. 'type' => 'string',
  224. 'required' => true,
  225. ],
  226. 'pageSize' => [
  227. 'location' => 'query',
  228. 'type' => 'integer',
  229. ],
  230. 'pageToken' => [
  231. 'location' => 'query',
  232. 'type' => 'string',
  233. ],
  234. ],
  235. ],'patch' => [
  236. 'path' => 'v1/{+name}',
  237. 'httpMethod' => 'PATCH',
  238. 'parameters' => [
  239. 'name' => [
  240. 'location' => 'path',
  241. 'type' => 'string',
  242. 'required' => true,
  243. ],
  244. 'updateMask' => [
  245. 'location' => 'query',
  246. 'type' => 'string',
  247. ],
  248. ],
  249. ],
  250. ]
  251. ]
  252. );
  253. $this->enterprises_devices_operations = new AndroidManagement\Resource\EnterprisesDevicesOperations(
  254. $this,
  255. $this->serviceName,
  256. 'operations',
  257. [
  258. 'methods' => [
  259. 'cancel' => [
  260. 'path' => 'v1/{+name}:cancel',
  261. 'httpMethod' => 'POST',
  262. 'parameters' => [
  263. 'name' => [
  264. 'location' => 'path',
  265. 'type' => 'string',
  266. 'required' => true,
  267. ],
  268. ],
  269. ],'delete' => [
  270. 'path' => 'v1/{+name}',
  271. 'httpMethod' => 'DELETE',
  272. 'parameters' => [
  273. 'name' => [
  274. 'location' => 'path',
  275. 'type' => 'string',
  276. 'required' => true,
  277. ],
  278. ],
  279. ],'get' => [
  280. 'path' => 'v1/{+name}',
  281. 'httpMethod' => 'GET',
  282. 'parameters' => [
  283. 'name' => [
  284. 'location' => 'path',
  285. 'type' => 'string',
  286. 'required' => true,
  287. ],
  288. ],
  289. ],'list' => [
  290. 'path' => 'v1/{+name}',
  291. 'httpMethod' => 'GET',
  292. 'parameters' => [
  293. 'name' => [
  294. 'location' => 'path',
  295. 'type' => 'string',
  296. 'required' => true,
  297. ],
  298. 'filter' => [
  299. 'location' => 'query',
  300. 'type' => 'string',
  301. ],
  302. 'pageSize' => [
  303. 'location' => 'query',
  304. 'type' => 'integer',
  305. ],
  306. 'pageToken' => [
  307. 'location' => 'query',
  308. 'type' => 'string',
  309. ],
  310. ],
  311. ],
  312. ]
  313. ]
  314. );
  315. $this->enterprises_enrollmentTokens = new AndroidManagement\Resource\EnterprisesEnrollmentTokens(
  316. $this,
  317. $this->serviceName,
  318. 'enrollmentTokens',
  319. [
  320. 'methods' => [
  321. 'create' => [
  322. 'path' => 'v1/{+parent}/enrollmentTokens',
  323. 'httpMethod' => 'POST',
  324. 'parameters' => [
  325. 'parent' => [
  326. 'location' => 'path',
  327. 'type' => 'string',
  328. 'required' => true,
  329. ],
  330. ],
  331. ],'delete' => [
  332. 'path' => 'v1/{+name}',
  333. 'httpMethod' => 'DELETE',
  334. 'parameters' => [
  335. 'name' => [
  336. 'location' => 'path',
  337. 'type' => 'string',
  338. 'required' => true,
  339. ],
  340. ],
  341. ],'get' => [
  342. 'path' => 'v1/{+name}',
  343. 'httpMethod' => 'GET',
  344. 'parameters' => [
  345. 'name' => [
  346. 'location' => 'path',
  347. 'type' => 'string',
  348. 'required' => true,
  349. ],
  350. ],
  351. ],'list' => [
  352. 'path' => 'v1/{+parent}/enrollmentTokens',
  353. 'httpMethod' => 'GET',
  354. 'parameters' => [
  355. 'parent' => [
  356. 'location' => 'path',
  357. 'type' => 'string',
  358. 'required' => true,
  359. ],
  360. 'pageSize' => [
  361. 'location' => 'query',
  362. 'type' => 'integer',
  363. ],
  364. 'pageToken' => [
  365. 'location' => 'query',
  366. 'type' => 'string',
  367. ],
  368. ],
  369. ],
  370. ]
  371. ]
  372. );
  373. $this->enterprises_policies = new AndroidManagement\Resource\EnterprisesPolicies(
  374. $this,
  375. $this->serviceName,
  376. 'policies',
  377. [
  378. 'methods' => [
  379. 'delete' => [
  380. 'path' => 'v1/{+name}',
  381. 'httpMethod' => 'DELETE',
  382. 'parameters' => [
  383. 'name' => [
  384. 'location' => 'path',
  385. 'type' => 'string',
  386. 'required' => true,
  387. ],
  388. ],
  389. ],'get' => [
  390. 'path' => 'v1/{+name}',
  391. 'httpMethod' => 'GET',
  392. 'parameters' => [
  393. 'name' => [
  394. 'location' => 'path',
  395. 'type' => 'string',
  396. 'required' => true,
  397. ],
  398. ],
  399. ],'list' => [
  400. 'path' => 'v1/{+parent}/policies',
  401. 'httpMethod' => 'GET',
  402. 'parameters' => [
  403. 'parent' => [
  404. 'location' => 'path',
  405. 'type' => 'string',
  406. 'required' => true,
  407. ],
  408. 'pageSize' => [
  409. 'location' => 'query',
  410. 'type' => 'integer',
  411. ],
  412. 'pageToken' => [
  413. 'location' => 'query',
  414. 'type' => 'string',
  415. ],
  416. ],
  417. ],'patch' => [
  418. 'path' => 'v1/{+name}',
  419. 'httpMethod' => 'PATCH',
  420. 'parameters' => [
  421. 'name' => [
  422. 'location' => 'path',
  423. 'type' => 'string',
  424. 'required' => true,
  425. ],
  426. 'updateMask' => [
  427. 'location' => 'query',
  428. 'type' => 'string',
  429. ],
  430. ],
  431. ],
  432. ]
  433. ]
  434. );
  435. $this->enterprises_webApps = new AndroidManagement\Resource\EnterprisesWebApps(
  436. $this,
  437. $this->serviceName,
  438. 'webApps',
  439. [
  440. 'methods' => [
  441. 'create' => [
  442. 'path' => 'v1/{+parent}/webApps',
  443. 'httpMethod' => 'POST',
  444. 'parameters' => [
  445. 'parent' => [
  446. 'location' => 'path',
  447. 'type' => 'string',
  448. 'required' => true,
  449. ],
  450. ],
  451. ],'delete' => [
  452. 'path' => 'v1/{+name}',
  453. 'httpMethod' => 'DELETE',
  454. 'parameters' => [
  455. 'name' => [
  456. 'location' => 'path',
  457. 'type' => 'string',
  458. 'required' => true,
  459. ],
  460. ],
  461. ],'get' => [
  462. 'path' => 'v1/{+name}',
  463. 'httpMethod' => 'GET',
  464. 'parameters' => [
  465. 'name' => [
  466. 'location' => 'path',
  467. 'type' => 'string',
  468. 'required' => true,
  469. ],
  470. ],
  471. ],'list' => [
  472. 'path' => 'v1/{+parent}/webApps',
  473. 'httpMethod' => 'GET',
  474. 'parameters' => [
  475. 'parent' => [
  476. 'location' => 'path',
  477. 'type' => 'string',
  478. 'required' => true,
  479. ],
  480. 'pageSize' => [
  481. 'location' => 'query',
  482. 'type' => 'integer',
  483. ],
  484. 'pageToken' => [
  485. 'location' => 'query',
  486. 'type' => 'string',
  487. ],
  488. ],
  489. ],'patch' => [
  490. 'path' => 'v1/{+name}',
  491. 'httpMethod' => 'PATCH',
  492. 'parameters' => [
  493. 'name' => [
  494. 'location' => 'path',
  495. 'type' => 'string',
  496. 'required' => true,
  497. ],
  498. 'updateMask' => [
  499. 'location' => 'query',
  500. 'type' => 'string',
  501. ],
  502. ],
  503. ],
  504. ]
  505. ]
  506. );
  507. $this->enterprises_webTokens = new AndroidManagement\Resource\EnterprisesWebTokens(
  508. $this,
  509. $this->serviceName,
  510. 'webTokens',
  511. [
  512. 'methods' => [
  513. 'create' => [
  514. 'path' => 'v1/{+parent}/webTokens',
  515. 'httpMethod' => 'POST',
  516. 'parameters' => [
  517. 'parent' => [
  518. 'location' => 'path',
  519. 'type' => 'string',
  520. 'required' => true,
  521. ],
  522. ],
  523. ],
  524. ]
  525. ]
  526. );
  527. $this->signupUrls = new AndroidManagement\Resource\SignupUrls(
  528. $this,
  529. $this->serviceName,
  530. 'signupUrls',
  531. [
  532. 'methods' => [
  533. 'create' => [
  534. 'path' => 'v1/signupUrls',
  535. 'httpMethod' => 'POST',
  536. 'parameters' => [
  537. 'callbackUrl' => [
  538. 'location' => 'query',
  539. 'type' => 'string',
  540. ],
  541. 'projectId' => [
  542. 'location' => 'query',
  543. 'type' => 'string',
  544. ],
  545. ],
  546. ],
  547. ]
  548. ]
  549. );
  550. }
  551. }
  552. // Adding a class alias for backwards compatibility with the previous class name.
  553. class_alias(AndroidManagement::class, 'Google_Service_AndroidManagement');