CloudIdentity.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  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 CloudIdentity (v1).
  21. *
  22. * <p>
  23. * API for provisioning and managing identity resources.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/identity/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class CloudIdentity extends \Google\Service
  33. {
  34. /** Private Service: https://www.googleapis.com/auth/cloud-identity. */
  35. const CLOUD_IDENTITY =
  36. "https://www.googleapis.com/auth/cloud-identity";
  37. /** Private Service: https://www.googleapis.com/auth/cloud-identity.devices. */
  38. const CLOUD_IDENTITY_DEVICES =
  39. "https://www.googleapis.com/auth/cloud-identity.devices";
  40. /** See your device details. */
  41. const CLOUD_IDENTITY_DEVICES_LOOKUP =
  42. "https://www.googleapis.com/auth/cloud-identity.devices.lookup";
  43. /** Private Service: https://www.googleapis.com/auth/cloud-identity.devices.readonly. */
  44. const CLOUD_IDENTITY_DEVICES_READONLY =
  45. "https://www.googleapis.com/auth/cloud-identity.devices.readonly";
  46. /** See, change, create, and delete any of the Cloud Identity Groups that you can access, including the members of each group. */
  47. const CLOUD_IDENTITY_GROUPS =
  48. "https://www.googleapis.com/auth/cloud-identity.groups";
  49. /** See any Cloud Identity Groups that you can access, including group members and their emails. */
  50. const CLOUD_IDENTITY_GROUPS_READONLY =
  51. "https://www.googleapis.com/auth/cloud-identity.groups.readonly";
  52. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  53. const CLOUD_PLATFORM =
  54. "https://www.googleapis.com/auth/cloud-platform";
  55. public $devices;
  56. public $devices_deviceUsers;
  57. public $devices_deviceUsers_clientStates;
  58. public $groups;
  59. public $groups_memberships;
  60. /**
  61. * Constructs the internal representation of the CloudIdentity service.
  62. *
  63. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  64. * config array to pass to a new Client instance.
  65. * @param string $rootUrl The root URL used for requests to the service.
  66. */
  67. public function __construct($clientOrConfig = [], $rootUrl = null)
  68. {
  69. parent::__construct($clientOrConfig);
  70. $this->rootUrl = $rootUrl ?: 'https://cloudidentity.googleapis.com/';
  71. $this->servicePath = '';
  72. $this->batchPath = 'batch';
  73. $this->version = 'v1';
  74. $this->serviceName = 'cloudidentity';
  75. $this->devices = new CloudIdentity\Resource\Devices(
  76. $this,
  77. $this->serviceName,
  78. 'devices',
  79. [
  80. 'methods' => [
  81. 'cancelWipe' => [
  82. 'path' => 'v1/{+name}:cancelWipe',
  83. 'httpMethod' => 'POST',
  84. 'parameters' => [
  85. 'name' => [
  86. 'location' => 'path',
  87. 'type' => 'string',
  88. 'required' => true,
  89. ],
  90. ],
  91. ],'create' => [
  92. 'path' => 'v1/devices',
  93. 'httpMethod' => 'POST',
  94. 'parameters' => [
  95. 'customer' => [
  96. 'location' => 'query',
  97. 'type' => 'string',
  98. ],
  99. ],
  100. ],'delete' => [
  101. 'path' => 'v1/{+name}',
  102. 'httpMethod' => 'DELETE',
  103. 'parameters' => [
  104. 'name' => [
  105. 'location' => 'path',
  106. 'type' => 'string',
  107. 'required' => true,
  108. ],
  109. 'customer' => [
  110. 'location' => 'query',
  111. 'type' => 'string',
  112. ],
  113. ],
  114. ],'get' => [
  115. 'path' => 'v1/{+name}',
  116. 'httpMethod' => 'GET',
  117. 'parameters' => [
  118. 'name' => [
  119. 'location' => 'path',
  120. 'type' => 'string',
  121. 'required' => true,
  122. ],
  123. 'customer' => [
  124. 'location' => 'query',
  125. 'type' => 'string',
  126. ],
  127. ],
  128. ],'list' => [
  129. 'path' => 'v1/devices',
  130. 'httpMethod' => 'GET',
  131. 'parameters' => [
  132. 'customer' => [
  133. 'location' => 'query',
  134. 'type' => 'string',
  135. ],
  136. 'filter' => [
  137. 'location' => 'query',
  138. 'type' => 'string',
  139. ],
  140. 'orderBy' => [
  141. 'location' => 'query',
  142. 'type' => 'string',
  143. ],
  144. 'pageSize' => [
  145. 'location' => 'query',
  146. 'type' => 'integer',
  147. ],
  148. 'pageToken' => [
  149. 'location' => 'query',
  150. 'type' => 'string',
  151. ],
  152. 'view' => [
  153. 'location' => 'query',
  154. 'type' => 'string',
  155. ],
  156. ],
  157. ],'wipe' => [
  158. 'path' => 'v1/{+name}:wipe',
  159. 'httpMethod' => 'POST',
  160. 'parameters' => [
  161. 'name' => [
  162. 'location' => 'path',
  163. 'type' => 'string',
  164. 'required' => true,
  165. ],
  166. ],
  167. ],
  168. ]
  169. ]
  170. );
  171. $this->devices_deviceUsers = new CloudIdentity\Resource\DevicesDeviceUsers(
  172. $this,
  173. $this->serviceName,
  174. 'deviceUsers',
  175. [
  176. 'methods' => [
  177. 'approve' => [
  178. 'path' => 'v1/{+name}:approve',
  179. 'httpMethod' => 'POST',
  180. 'parameters' => [
  181. 'name' => [
  182. 'location' => 'path',
  183. 'type' => 'string',
  184. 'required' => true,
  185. ],
  186. ],
  187. ],'block' => [
  188. 'path' => 'v1/{+name}:block',
  189. 'httpMethod' => 'POST',
  190. 'parameters' => [
  191. 'name' => [
  192. 'location' => 'path',
  193. 'type' => 'string',
  194. 'required' => true,
  195. ],
  196. ],
  197. ],'cancelWipe' => [
  198. 'path' => 'v1/{+name}:cancelWipe',
  199. 'httpMethod' => 'POST',
  200. 'parameters' => [
  201. 'name' => [
  202. 'location' => 'path',
  203. 'type' => 'string',
  204. 'required' => true,
  205. ],
  206. ],
  207. ],'delete' => [
  208. 'path' => 'v1/{+name}',
  209. 'httpMethod' => 'DELETE',
  210. 'parameters' => [
  211. 'name' => [
  212. 'location' => 'path',
  213. 'type' => 'string',
  214. 'required' => true,
  215. ],
  216. 'customer' => [
  217. 'location' => 'query',
  218. 'type' => 'string',
  219. ],
  220. ],
  221. ],'get' => [
  222. 'path' => 'v1/{+name}',
  223. 'httpMethod' => 'GET',
  224. 'parameters' => [
  225. 'name' => [
  226. 'location' => 'path',
  227. 'type' => 'string',
  228. 'required' => true,
  229. ],
  230. 'customer' => [
  231. 'location' => 'query',
  232. 'type' => 'string',
  233. ],
  234. ],
  235. ],'list' => [
  236. 'path' => 'v1/{+parent}/deviceUsers',
  237. 'httpMethod' => 'GET',
  238. 'parameters' => [
  239. 'parent' => [
  240. 'location' => 'path',
  241. 'type' => 'string',
  242. 'required' => true,
  243. ],
  244. 'customer' => [
  245. 'location' => 'query',
  246. 'type' => 'string',
  247. ],
  248. 'filter' => [
  249. 'location' => 'query',
  250. 'type' => 'string',
  251. ],
  252. 'orderBy' => [
  253. 'location' => 'query',
  254. 'type' => 'string',
  255. ],
  256. 'pageSize' => [
  257. 'location' => 'query',
  258. 'type' => 'integer',
  259. ],
  260. 'pageToken' => [
  261. 'location' => 'query',
  262. 'type' => 'string',
  263. ],
  264. ],
  265. ],'lookup' => [
  266. 'path' => 'v1/{+parent}:lookup',
  267. 'httpMethod' => 'GET',
  268. 'parameters' => [
  269. 'parent' => [
  270. 'location' => 'path',
  271. 'type' => 'string',
  272. 'required' => true,
  273. ],
  274. 'androidId' => [
  275. 'location' => 'query',
  276. 'type' => 'string',
  277. ],
  278. 'pageSize' => [
  279. 'location' => 'query',
  280. 'type' => 'integer',
  281. ],
  282. 'pageToken' => [
  283. 'location' => 'query',
  284. 'type' => 'string',
  285. ],
  286. 'rawResourceId' => [
  287. 'location' => 'query',
  288. 'type' => 'string',
  289. ],
  290. 'userId' => [
  291. 'location' => 'query',
  292. 'type' => 'string',
  293. ],
  294. ],
  295. ],'wipe' => [
  296. 'path' => 'v1/{+name}:wipe',
  297. 'httpMethod' => 'POST',
  298. 'parameters' => [
  299. 'name' => [
  300. 'location' => 'path',
  301. 'type' => 'string',
  302. 'required' => true,
  303. ],
  304. ],
  305. ],
  306. ]
  307. ]
  308. );
  309. $this->devices_deviceUsers_clientStates = new CloudIdentity\Resource\DevicesDeviceUsersClientStates(
  310. $this,
  311. $this->serviceName,
  312. 'clientStates',
  313. [
  314. 'methods' => [
  315. 'get' => [
  316. 'path' => 'v1/{+name}',
  317. 'httpMethod' => 'GET',
  318. 'parameters' => [
  319. 'name' => [
  320. 'location' => 'path',
  321. 'type' => 'string',
  322. 'required' => true,
  323. ],
  324. 'customer' => [
  325. 'location' => 'query',
  326. 'type' => 'string',
  327. ],
  328. ],
  329. ],'list' => [
  330. 'path' => 'v1/{+parent}/clientStates',
  331. 'httpMethod' => 'GET',
  332. 'parameters' => [
  333. 'parent' => [
  334. 'location' => 'path',
  335. 'type' => 'string',
  336. 'required' => true,
  337. ],
  338. 'customer' => [
  339. 'location' => 'query',
  340. 'type' => 'string',
  341. ],
  342. 'filter' => [
  343. 'location' => 'query',
  344. 'type' => 'string',
  345. ],
  346. 'orderBy' => [
  347. 'location' => 'query',
  348. 'type' => 'string',
  349. ],
  350. 'pageToken' => [
  351. 'location' => 'query',
  352. 'type' => 'string',
  353. ],
  354. ],
  355. ],'patch' => [
  356. 'path' => 'v1/{+name}',
  357. 'httpMethod' => 'PATCH',
  358. 'parameters' => [
  359. 'name' => [
  360. 'location' => 'path',
  361. 'type' => 'string',
  362. 'required' => true,
  363. ],
  364. 'customer' => [
  365. 'location' => 'query',
  366. 'type' => 'string',
  367. ],
  368. 'updateMask' => [
  369. 'location' => 'query',
  370. 'type' => 'string',
  371. ],
  372. ],
  373. ],
  374. ]
  375. ]
  376. );
  377. $this->groups = new CloudIdentity\Resource\Groups(
  378. $this,
  379. $this->serviceName,
  380. 'groups',
  381. [
  382. 'methods' => [
  383. 'create' => [
  384. 'path' => 'v1/groups',
  385. 'httpMethod' => 'POST',
  386. 'parameters' => [
  387. 'initialGroupConfig' => [
  388. 'location' => 'query',
  389. 'type' => 'string',
  390. ],
  391. ],
  392. ],'delete' => [
  393. 'path' => 'v1/{+name}',
  394. 'httpMethod' => 'DELETE',
  395. 'parameters' => [
  396. 'name' => [
  397. 'location' => 'path',
  398. 'type' => 'string',
  399. 'required' => true,
  400. ],
  401. ],
  402. ],'get' => [
  403. 'path' => 'v1/{+name}',
  404. 'httpMethod' => 'GET',
  405. 'parameters' => [
  406. 'name' => [
  407. 'location' => 'path',
  408. 'type' => 'string',
  409. 'required' => true,
  410. ],
  411. ],
  412. ],'getSecuritySettings' => [
  413. 'path' => 'v1/{+name}',
  414. 'httpMethod' => 'GET',
  415. 'parameters' => [
  416. 'name' => [
  417. 'location' => 'path',
  418. 'type' => 'string',
  419. 'required' => true,
  420. ],
  421. 'readMask' => [
  422. 'location' => 'query',
  423. 'type' => 'string',
  424. ],
  425. ],
  426. ],'list' => [
  427. 'path' => 'v1/groups',
  428. 'httpMethod' => 'GET',
  429. 'parameters' => [
  430. 'pageSize' => [
  431. 'location' => 'query',
  432. 'type' => 'integer',
  433. ],
  434. 'pageToken' => [
  435. 'location' => 'query',
  436. 'type' => 'string',
  437. ],
  438. 'parent' => [
  439. 'location' => 'query',
  440. 'type' => 'string',
  441. ],
  442. 'view' => [
  443. 'location' => 'query',
  444. 'type' => 'string',
  445. ],
  446. ],
  447. ],'lookup' => [
  448. 'path' => 'v1/groups:lookup',
  449. 'httpMethod' => 'GET',
  450. 'parameters' => [
  451. 'groupKey.id' => [
  452. 'location' => 'query',
  453. 'type' => 'string',
  454. ],
  455. 'groupKey.namespace' => [
  456. 'location' => 'query',
  457. 'type' => 'string',
  458. ],
  459. ],
  460. ],'patch' => [
  461. 'path' => 'v1/{+name}',
  462. 'httpMethod' => 'PATCH',
  463. 'parameters' => [
  464. 'name' => [
  465. 'location' => 'path',
  466. 'type' => 'string',
  467. 'required' => true,
  468. ],
  469. 'updateMask' => [
  470. 'location' => 'query',
  471. 'type' => 'string',
  472. ],
  473. ],
  474. ],'search' => [
  475. 'path' => 'v1/groups:search',
  476. 'httpMethod' => 'GET',
  477. 'parameters' => [
  478. 'pageSize' => [
  479. 'location' => 'query',
  480. 'type' => 'integer',
  481. ],
  482. 'pageToken' => [
  483. 'location' => 'query',
  484. 'type' => 'string',
  485. ],
  486. 'query' => [
  487. 'location' => 'query',
  488. 'type' => 'string',
  489. ],
  490. 'view' => [
  491. 'location' => 'query',
  492. 'type' => 'string',
  493. ],
  494. ],
  495. ],'updateSecuritySettings' => [
  496. 'path' => 'v1/{+name}',
  497. 'httpMethod' => 'PATCH',
  498. 'parameters' => [
  499. 'name' => [
  500. 'location' => 'path',
  501. 'type' => 'string',
  502. 'required' => true,
  503. ],
  504. 'updateMask' => [
  505. 'location' => 'query',
  506. 'type' => 'string',
  507. ],
  508. ],
  509. ],
  510. ]
  511. ]
  512. );
  513. $this->groups_memberships = new CloudIdentity\Resource\GroupsMemberships(
  514. $this,
  515. $this->serviceName,
  516. 'memberships',
  517. [
  518. 'methods' => [
  519. 'checkTransitiveMembership' => [
  520. 'path' => 'v1/{+parent}/memberships:checkTransitiveMembership',
  521. 'httpMethod' => 'GET',
  522. 'parameters' => [
  523. 'parent' => [
  524. 'location' => 'path',
  525. 'type' => 'string',
  526. 'required' => true,
  527. ],
  528. 'query' => [
  529. 'location' => 'query',
  530. 'type' => 'string',
  531. ],
  532. ],
  533. ],'create' => [
  534. 'path' => 'v1/{+parent}/memberships',
  535. 'httpMethod' => 'POST',
  536. 'parameters' => [
  537. 'parent' => [
  538. 'location' => 'path',
  539. 'type' => 'string',
  540. 'required' => true,
  541. ],
  542. ],
  543. ],'delete' => [
  544. 'path' => 'v1/{+name}',
  545. 'httpMethod' => 'DELETE',
  546. 'parameters' => [
  547. 'name' => [
  548. 'location' => 'path',
  549. 'type' => 'string',
  550. 'required' => true,
  551. ],
  552. ],
  553. ],'get' => [
  554. 'path' => 'v1/{+name}',
  555. 'httpMethod' => 'GET',
  556. 'parameters' => [
  557. 'name' => [
  558. 'location' => 'path',
  559. 'type' => 'string',
  560. 'required' => true,
  561. ],
  562. ],
  563. ],'getMembershipGraph' => [
  564. 'path' => 'v1/{+parent}/memberships:getMembershipGraph',
  565. 'httpMethod' => 'GET',
  566. 'parameters' => [
  567. 'parent' => [
  568. 'location' => 'path',
  569. 'type' => 'string',
  570. 'required' => true,
  571. ],
  572. 'query' => [
  573. 'location' => 'query',
  574. 'type' => 'string',
  575. ],
  576. ],
  577. ],'list' => [
  578. 'path' => 'v1/{+parent}/memberships',
  579. 'httpMethod' => 'GET',
  580. 'parameters' => [
  581. 'parent' => [
  582. 'location' => 'path',
  583. 'type' => 'string',
  584. 'required' => true,
  585. ],
  586. 'pageSize' => [
  587. 'location' => 'query',
  588. 'type' => 'integer',
  589. ],
  590. 'pageToken' => [
  591. 'location' => 'query',
  592. 'type' => 'string',
  593. ],
  594. 'view' => [
  595. 'location' => 'query',
  596. 'type' => 'string',
  597. ],
  598. ],
  599. ],'lookup' => [
  600. 'path' => 'v1/{+parent}/memberships:lookup',
  601. 'httpMethod' => 'GET',
  602. 'parameters' => [
  603. 'parent' => [
  604. 'location' => 'path',
  605. 'type' => 'string',
  606. 'required' => true,
  607. ],
  608. 'memberKey.id' => [
  609. 'location' => 'query',
  610. 'type' => 'string',
  611. ],
  612. 'memberKey.namespace' => [
  613. 'location' => 'query',
  614. 'type' => 'string',
  615. ],
  616. ],
  617. ],'modifyMembershipRoles' => [
  618. 'path' => 'v1/{+name}:modifyMembershipRoles',
  619. 'httpMethod' => 'POST',
  620. 'parameters' => [
  621. 'name' => [
  622. 'location' => 'path',
  623. 'type' => 'string',
  624. 'required' => true,
  625. ],
  626. ],
  627. ],'searchTransitiveGroups' => [
  628. 'path' => 'v1/{+parent}/memberships:searchTransitiveGroups',
  629. 'httpMethod' => 'GET',
  630. 'parameters' => [
  631. 'parent' => [
  632. 'location' => 'path',
  633. 'type' => 'string',
  634. 'required' => true,
  635. ],
  636. 'pageSize' => [
  637. 'location' => 'query',
  638. 'type' => 'integer',
  639. ],
  640. 'pageToken' => [
  641. 'location' => 'query',
  642. 'type' => 'string',
  643. ],
  644. 'query' => [
  645. 'location' => 'query',
  646. 'type' => 'string',
  647. ],
  648. ],
  649. ],'searchTransitiveMemberships' => [
  650. 'path' => 'v1/{+parent}/memberships:searchTransitiveMemberships',
  651. 'httpMethod' => 'GET',
  652. 'parameters' => [
  653. 'parent' => [
  654. 'location' => 'path',
  655. 'type' => 'string',
  656. 'required' => true,
  657. ],
  658. 'pageSize' => [
  659. 'location' => 'query',
  660. 'type' => 'integer',
  661. ],
  662. 'pageToken' => [
  663. 'location' => 'query',
  664. 'type' => 'string',
  665. ],
  666. ],
  667. ],
  668. ]
  669. ]
  670. );
  671. }
  672. }
  673. // Adding a class alias for backwards compatibility with the previous class name.
  674. class_alias(CloudIdentity::class, 'Google_Service_CloudIdentity');