AndroidManagement.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  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_migrationTokens;
  44. public $enterprises_policies;
  45. public $enterprises_webApps;
  46. public $enterprises_webTokens;
  47. public $provisioningInfo;
  48. public $signupUrls;
  49. public $rootUrlTemplate;
  50. /**
  51. * Constructs the internal representation of the AndroidManagement service.
  52. *
  53. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  54. * config array to pass to a new Client instance.
  55. * @param string $rootUrl The root URL used for requests to the service.
  56. */
  57. public function __construct($clientOrConfig = [], $rootUrl = null)
  58. {
  59. parent::__construct($clientOrConfig);
  60. $this->rootUrl = $rootUrl ?: 'https://androidmanagement.googleapis.com/';
  61. $this->rootUrlTemplate = $rootUrl ?: 'https://androidmanagement.UNIVERSE_DOMAIN/';
  62. $this->servicePath = '';
  63. $this->batchPath = 'batch';
  64. $this->version = 'v1';
  65. $this->serviceName = 'androidmanagement';
  66. $this->enterprises = new AndroidManagement\Resource\Enterprises(
  67. $this,
  68. $this->serviceName,
  69. 'enterprises',
  70. [
  71. 'methods' => [
  72. 'create' => [
  73. 'path' => 'v1/enterprises',
  74. 'httpMethod' => 'POST',
  75. 'parameters' => [
  76. 'agreementAccepted' => [
  77. 'location' => 'query',
  78. 'type' => 'boolean',
  79. ],
  80. 'enterpriseToken' => [
  81. 'location' => 'query',
  82. 'type' => 'string',
  83. ],
  84. 'projectId' => [
  85. 'location' => 'query',
  86. 'type' => 'string',
  87. ],
  88. 'signupUrlName' => [
  89. 'location' => 'query',
  90. 'type' => 'string',
  91. ],
  92. ],
  93. ],'delete' => [
  94. 'path' => 'v1/{+name}',
  95. 'httpMethod' => 'DELETE',
  96. 'parameters' => [
  97. 'name' => [
  98. 'location' => 'path',
  99. 'type' => 'string',
  100. 'required' => true,
  101. ],
  102. ],
  103. ],'generateEnterpriseUpgradeUrl' => [
  104. 'path' => 'v1/{+name}:generateEnterpriseUpgradeUrl',
  105. 'httpMethod' => 'POST',
  106. 'parameters' => [
  107. 'name' => [
  108. 'location' => 'path',
  109. 'type' => 'string',
  110. 'required' => true,
  111. ],
  112. ],
  113. ],'get' => [
  114. 'path' => 'v1/{+name}',
  115. 'httpMethod' => 'GET',
  116. 'parameters' => [
  117. 'name' => [
  118. 'location' => 'path',
  119. 'type' => 'string',
  120. 'required' => true,
  121. ],
  122. ],
  123. ],'list' => [
  124. 'path' => 'v1/enterprises',
  125. 'httpMethod' => 'GET',
  126. 'parameters' => [
  127. 'pageSize' => [
  128. 'location' => 'query',
  129. 'type' => 'integer',
  130. ],
  131. 'pageToken' => [
  132. 'location' => 'query',
  133. 'type' => 'string',
  134. ],
  135. 'projectId' => [
  136. 'location' => 'query',
  137. 'type' => 'string',
  138. ],
  139. 'view' => [
  140. 'location' => 'query',
  141. 'type' => 'string',
  142. ],
  143. ],
  144. ],'patch' => [
  145. 'path' => 'v1/{+name}',
  146. 'httpMethod' => 'PATCH',
  147. 'parameters' => [
  148. 'name' => [
  149. 'location' => 'path',
  150. 'type' => 'string',
  151. 'required' => true,
  152. ],
  153. 'updateMask' => [
  154. 'location' => 'query',
  155. 'type' => 'string',
  156. ],
  157. ],
  158. ],
  159. ]
  160. ]
  161. );
  162. $this->enterprises_applications = new AndroidManagement\Resource\EnterprisesApplications(
  163. $this,
  164. $this->serviceName,
  165. 'applications',
  166. [
  167. 'methods' => [
  168. 'get' => [
  169. 'path' => 'v1/{+name}',
  170. 'httpMethod' => 'GET',
  171. 'parameters' => [
  172. 'name' => [
  173. 'location' => 'path',
  174. 'type' => 'string',
  175. 'required' => true,
  176. ],
  177. 'languageCode' => [
  178. 'location' => 'query',
  179. 'type' => 'string',
  180. ],
  181. ],
  182. ],
  183. ]
  184. ]
  185. );
  186. $this->enterprises_devices = new AndroidManagement\Resource\EnterprisesDevices(
  187. $this,
  188. $this->serviceName,
  189. 'devices',
  190. [
  191. 'methods' => [
  192. 'delete' => [
  193. 'path' => 'v1/{+name}',
  194. 'httpMethod' => 'DELETE',
  195. 'parameters' => [
  196. 'name' => [
  197. 'location' => 'path',
  198. 'type' => 'string',
  199. 'required' => true,
  200. ],
  201. 'wipeDataFlags' => [
  202. 'location' => 'query',
  203. 'type' => 'string',
  204. 'repeated' => true,
  205. ],
  206. 'wipeReasonMessage' => [
  207. 'location' => 'query',
  208. 'type' => 'string',
  209. ],
  210. ],
  211. ],'get' => [
  212. 'path' => 'v1/{+name}',
  213. 'httpMethod' => 'GET',
  214. 'parameters' => [
  215. 'name' => [
  216. 'location' => 'path',
  217. 'type' => 'string',
  218. 'required' => true,
  219. ],
  220. ],
  221. ],'issueCommand' => [
  222. 'path' => 'v1/{+name}:issueCommand',
  223. 'httpMethod' => 'POST',
  224. 'parameters' => [
  225. 'name' => [
  226. 'location' => 'path',
  227. 'type' => 'string',
  228. 'required' => true,
  229. ],
  230. ],
  231. ],'list' => [
  232. 'path' => 'v1/{+parent}/devices',
  233. 'httpMethod' => 'GET',
  234. 'parameters' => [
  235. 'parent' => [
  236. 'location' => 'path',
  237. 'type' => 'string',
  238. 'required' => true,
  239. ],
  240. 'pageSize' => [
  241. 'location' => 'query',
  242. 'type' => 'integer',
  243. ],
  244. 'pageToken' => [
  245. 'location' => 'query',
  246. 'type' => 'string',
  247. ],
  248. ],
  249. ],'patch' => [
  250. 'path' => 'v1/{+name}',
  251. 'httpMethod' => 'PATCH',
  252. 'parameters' => [
  253. 'name' => [
  254. 'location' => 'path',
  255. 'type' => 'string',
  256. 'required' => true,
  257. ],
  258. 'updateMask' => [
  259. 'location' => 'query',
  260. 'type' => 'string',
  261. ],
  262. ],
  263. ],
  264. ]
  265. ]
  266. );
  267. $this->enterprises_devices_operations = new AndroidManagement\Resource\EnterprisesDevicesOperations(
  268. $this,
  269. $this->serviceName,
  270. 'operations',
  271. [
  272. 'methods' => [
  273. 'cancel' => [
  274. 'path' => 'v1/{+name}:cancel',
  275. 'httpMethod' => 'POST',
  276. 'parameters' => [
  277. 'name' => [
  278. 'location' => 'path',
  279. 'type' => 'string',
  280. 'required' => true,
  281. ],
  282. ],
  283. ],'get' => [
  284. 'path' => 'v1/{+name}',
  285. 'httpMethod' => 'GET',
  286. 'parameters' => [
  287. 'name' => [
  288. 'location' => 'path',
  289. 'type' => 'string',
  290. 'required' => true,
  291. ],
  292. ],
  293. ],'list' => [
  294. 'path' => 'v1/{+name}',
  295. 'httpMethod' => 'GET',
  296. 'parameters' => [
  297. 'name' => [
  298. 'location' => 'path',
  299. 'type' => 'string',
  300. 'required' => true,
  301. ],
  302. 'filter' => [
  303. 'location' => 'query',
  304. 'type' => 'string',
  305. ],
  306. 'pageSize' => [
  307. 'location' => 'query',
  308. 'type' => 'integer',
  309. ],
  310. 'pageToken' => [
  311. 'location' => 'query',
  312. 'type' => 'string',
  313. ],
  314. 'returnPartialSuccess' => [
  315. 'location' => 'query',
  316. 'type' => 'boolean',
  317. ],
  318. ],
  319. ],
  320. ]
  321. ]
  322. );
  323. $this->enterprises_enrollmentTokens = new AndroidManagement\Resource\EnterprisesEnrollmentTokens(
  324. $this,
  325. $this->serviceName,
  326. 'enrollmentTokens',
  327. [
  328. 'methods' => [
  329. 'create' => [
  330. 'path' => 'v1/{+parent}/enrollmentTokens',
  331. 'httpMethod' => 'POST',
  332. 'parameters' => [
  333. 'parent' => [
  334. 'location' => 'path',
  335. 'type' => 'string',
  336. 'required' => true,
  337. ],
  338. ],
  339. ],'delete' => [
  340. 'path' => 'v1/{+name}',
  341. 'httpMethod' => 'DELETE',
  342. 'parameters' => [
  343. 'name' => [
  344. 'location' => 'path',
  345. 'type' => 'string',
  346. 'required' => true,
  347. ],
  348. ],
  349. ],'get' => [
  350. 'path' => 'v1/{+name}',
  351. 'httpMethod' => 'GET',
  352. 'parameters' => [
  353. 'name' => [
  354. 'location' => 'path',
  355. 'type' => 'string',
  356. 'required' => true,
  357. ],
  358. ],
  359. ],'list' => [
  360. 'path' => 'v1/{+parent}/enrollmentTokens',
  361. 'httpMethod' => 'GET',
  362. 'parameters' => [
  363. 'parent' => [
  364. 'location' => 'path',
  365. 'type' => 'string',
  366. 'required' => true,
  367. ],
  368. 'pageSize' => [
  369. 'location' => 'query',
  370. 'type' => 'integer',
  371. ],
  372. 'pageToken' => [
  373. 'location' => 'query',
  374. 'type' => 'string',
  375. ],
  376. ],
  377. ],
  378. ]
  379. ]
  380. );
  381. $this->enterprises_migrationTokens = new AndroidManagement\Resource\EnterprisesMigrationTokens(
  382. $this,
  383. $this->serviceName,
  384. 'migrationTokens',
  385. [
  386. 'methods' => [
  387. 'create' => [
  388. 'path' => 'v1/{+parent}/migrationTokens',
  389. 'httpMethod' => 'POST',
  390. 'parameters' => [
  391. 'parent' => [
  392. 'location' => 'path',
  393. 'type' => 'string',
  394. 'required' => true,
  395. ],
  396. ],
  397. ],'get' => [
  398. 'path' => 'v1/{+name}',
  399. 'httpMethod' => 'GET',
  400. 'parameters' => [
  401. 'name' => [
  402. 'location' => 'path',
  403. 'type' => 'string',
  404. 'required' => true,
  405. ],
  406. ],
  407. ],'list' => [
  408. 'path' => 'v1/{+parent}/migrationTokens',
  409. 'httpMethod' => 'GET',
  410. 'parameters' => [
  411. 'parent' => [
  412. 'location' => 'path',
  413. 'type' => 'string',
  414. 'required' => true,
  415. ],
  416. 'pageSize' => [
  417. 'location' => 'query',
  418. 'type' => 'integer',
  419. ],
  420. 'pageToken' => [
  421. 'location' => 'query',
  422. 'type' => 'string',
  423. ],
  424. ],
  425. ],
  426. ]
  427. ]
  428. );
  429. $this->enterprises_policies = new AndroidManagement\Resource\EnterprisesPolicies(
  430. $this,
  431. $this->serviceName,
  432. 'policies',
  433. [
  434. 'methods' => [
  435. 'delete' => [
  436. 'path' => 'v1/{+name}',
  437. 'httpMethod' => 'DELETE',
  438. 'parameters' => [
  439. 'name' => [
  440. 'location' => 'path',
  441. 'type' => 'string',
  442. 'required' => true,
  443. ],
  444. ],
  445. ],'get' => [
  446. 'path' => 'v1/{+name}',
  447. 'httpMethod' => 'GET',
  448. 'parameters' => [
  449. 'name' => [
  450. 'location' => 'path',
  451. 'type' => 'string',
  452. 'required' => true,
  453. ],
  454. ],
  455. ],'list' => [
  456. 'path' => 'v1/{+parent}/policies',
  457. 'httpMethod' => 'GET',
  458. 'parameters' => [
  459. 'parent' => [
  460. 'location' => 'path',
  461. 'type' => 'string',
  462. 'required' => true,
  463. ],
  464. 'pageSize' => [
  465. 'location' => 'query',
  466. 'type' => 'integer',
  467. ],
  468. 'pageToken' => [
  469. 'location' => 'query',
  470. 'type' => 'string',
  471. ],
  472. ],
  473. ],'modifyPolicyApplications' => [
  474. 'path' => 'v1/{+name}:modifyPolicyApplications',
  475. 'httpMethod' => 'POST',
  476. 'parameters' => [
  477. 'name' => [
  478. 'location' => 'path',
  479. 'type' => 'string',
  480. 'required' => true,
  481. ],
  482. ],
  483. ],'patch' => [
  484. 'path' => 'v1/{+name}',
  485. 'httpMethod' => 'PATCH',
  486. 'parameters' => [
  487. 'name' => [
  488. 'location' => 'path',
  489. 'type' => 'string',
  490. 'required' => true,
  491. ],
  492. 'updateMask' => [
  493. 'location' => 'query',
  494. 'type' => 'string',
  495. ],
  496. ],
  497. ],'removePolicyApplications' => [
  498. 'path' => 'v1/{+name}:removePolicyApplications',
  499. 'httpMethod' => 'POST',
  500. 'parameters' => [
  501. 'name' => [
  502. 'location' => 'path',
  503. 'type' => 'string',
  504. 'required' => true,
  505. ],
  506. ],
  507. ],
  508. ]
  509. ]
  510. );
  511. $this->enterprises_webApps = new AndroidManagement\Resource\EnterprisesWebApps(
  512. $this,
  513. $this->serviceName,
  514. 'webApps',
  515. [
  516. 'methods' => [
  517. 'create' => [
  518. 'path' => 'v1/{+parent}/webApps',
  519. 'httpMethod' => 'POST',
  520. 'parameters' => [
  521. 'parent' => [
  522. 'location' => 'path',
  523. 'type' => 'string',
  524. 'required' => true,
  525. ],
  526. ],
  527. ],'delete' => [
  528. 'path' => 'v1/{+name}',
  529. 'httpMethod' => 'DELETE',
  530. 'parameters' => [
  531. 'name' => [
  532. 'location' => 'path',
  533. 'type' => 'string',
  534. 'required' => true,
  535. ],
  536. ],
  537. ],'get' => [
  538. 'path' => 'v1/{+name}',
  539. 'httpMethod' => 'GET',
  540. 'parameters' => [
  541. 'name' => [
  542. 'location' => 'path',
  543. 'type' => 'string',
  544. 'required' => true,
  545. ],
  546. ],
  547. ],'list' => [
  548. 'path' => 'v1/{+parent}/webApps',
  549. 'httpMethod' => 'GET',
  550. 'parameters' => [
  551. 'parent' => [
  552. 'location' => 'path',
  553. 'type' => 'string',
  554. 'required' => true,
  555. ],
  556. 'pageSize' => [
  557. 'location' => 'query',
  558. 'type' => 'integer',
  559. ],
  560. 'pageToken' => [
  561. 'location' => 'query',
  562. 'type' => 'string',
  563. ],
  564. ],
  565. ],'patch' => [
  566. 'path' => 'v1/{+name}',
  567. 'httpMethod' => 'PATCH',
  568. 'parameters' => [
  569. 'name' => [
  570. 'location' => 'path',
  571. 'type' => 'string',
  572. 'required' => true,
  573. ],
  574. 'updateMask' => [
  575. 'location' => 'query',
  576. 'type' => 'string',
  577. ],
  578. ],
  579. ],
  580. ]
  581. ]
  582. );
  583. $this->enterprises_webTokens = new AndroidManagement\Resource\EnterprisesWebTokens(
  584. $this,
  585. $this->serviceName,
  586. 'webTokens',
  587. [
  588. 'methods' => [
  589. 'create' => [
  590. 'path' => 'v1/{+parent}/webTokens',
  591. 'httpMethod' => 'POST',
  592. 'parameters' => [
  593. 'parent' => [
  594. 'location' => 'path',
  595. 'type' => 'string',
  596. 'required' => true,
  597. ],
  598. ],
  599. ],
  600. ]
  601. ]
  602. );
  603. $this->provisioningInfo = new AndroidManagement\Resource\ProvisioningInfo(
  604. $this,
  605. $this->serviceName,
  606. 'provisioningInfo',
  607. [
  608. 'methods' => [
  609. 'get' => [
  610. 'path' => 'v1/{+name}',
  611. 'httpMethod' => 'GET',
  612. 'parameters' => [
  613. 'name' => [
  614. 'location' => 'path',
  615. 'type' => 'string',
  616. 'required' => true,
  617. ],
  618. ],
  619. ],
  620. ]
  621. ]
  622. );
  623. $this->signupUrls = new AndroidManagement\Resource\SignupUrls(
  624. $this,
  625. $this->serviceName,
  626. 'signupUrls',
  627. [
  628. 'methods' => [
  629. 'create' => [
  630. 'path' => 'v1/signupUrls',
  631. 'httpMethod' => 'POST',
  632. 'parameters' => [
  633. 'adminEmail' => [
  634. 'location' => 'query',
  635. 'type' => 'string',
  636. ],
  637. 'allowedDomains' => [
  638. 'location' => 'query',
  639. 'type' => 'string',
  640. 'repeated' => true,
  641. ],
  642. 'callbackUrl' => [
  643. 'location' => 'query',
  644. 'type' => 'string',
  645. ],
  646. 'projectId' => [
  647. 'location' => 'query',
  648. 'type' => 'string',
  649. ],
  650. ],
  651. ],
  652. ]
  653. ]
  654. );
  655. }
  656. }
  657. // Adding a class alias for backwards compatibility with the previous class name.
  658. class_alias(AndroidManagement::class, 'Google_Service_AndroidManagement');