AccessContextManager.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  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 AccessContextManager (v1).
  21. *
  22. * <p>
  23. * An API for setting attribute based access control to requests to Google Cloud
  24. * services. *Warning:* Do not mix *v1alpha* and *v1* API usage in the same
  25. * access policy. The v1alpha API supports new Access Context Manager features,
  26. * which may have different attributes or behaviors that are not supported by
  27. * v1. The practice of mixed API usage within a policy may result in the
  28. * inability to update that policy, including any access levels or service
  29. * perimeters belonging to it. It is not recommended to use both v1 and v1alpha
  30. * for modifying policies with critical service perimeters. Modifications using
  31. * v1alpha should be limited to policies with non-production/non-critical
  32. * service perimeters.</p>
  33. *
  34. * <p>
  35. * For more information about this service, see the API
  36. * <a href="https://cloud.google.com/access-context-manager/docs/reference/rest/" target="_blank">Documentation</a>
  37. * </p>
  38. *
  39. * @author Google, Inc.
  40. */
  41. class AccessContextManager extends \Google\Service
  42. {
  43. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  44. const CLOUD_PLATFORM =
  45. "https://www.googleapis.com/auth/cloud-platform";
  46. public $accessPolicies;
  47. public $accessPolicies_accessLevels;
  48. public $accessPolicies_authorizedOrgsDescs;
  49. public $accessPolicies_servicePerimeters;
  50. public $operations;
  51. public $organizations_gcpUserAccessBindings;
  52. public $permissions;
  53. public $services;
  54. public $rootUrlTemplate;
  55. /**
  56. * Constructs the internal representation of the AccessContextManager service.
  57. *
  58. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  59. * config array to pass to a new Client instance.
  60. * @param string $rootUrl The root URL used for requests to the service.
  61. */
  62. public function __construct($clientOrConfig = [], $rootUrl = null)
  63. {
  64. parent::__construct($clientOrConfig);
  65. $this->rootUrl = $rootUrl ?: 'https://accesscontextmanager.googleapis.com/';
  66. $this->rootUrlTemplate = $rootUrl ?: 'https://accesscontextmanager.UNIVERSE_DOMAIN/';
  67. $this->servicePath = '';
  68. $this->batchPath = 'batch';
  69. $this->version = 'v1';
  70. $this->serviceName = 'accesscontextmanager';
  71. $this->accessPolicies = new AccessContextManager\Resource\AccessPolicies(
  72. $this,
  73. $this->serviceName,
  74. 'accessPolicies',
  75. [
  76. 'methods' => [
  77. 'create' => [
  78. 'path' => 'v1/accessPolicies',
  79. 'httpMethod' => 'POST',
  80. 'parameters' => [],
  81. ],'delete' => [
  82. 'path' => 'v1/{+name}',
  83. 'httpMethod' => 'DELETE',
  84. 'parameters' => [
  85. 'name' => [
  86. 'location' => 'path',
  87. 'type' => 'string',
  88. 'required' => true,
  89. ],
  90. ],
  91. ],'get' => [
  92. 'path' => 'v1/{+name}',
  93. 'httpMethod' => 'GET',
  94. 'parameters' => [
  95. 'name' => [
  96. 'location' => 'path',
  97. 'type' => 'string',
  98. 'required' => true,
  99. ],
  100. ],
  101. ],'getIamPolicy' => [
  102. 'path' => 'v1/{+resource}:getIamPolicy',
  103. 'httpMethod' => 'POST',
  104. 'parameters' => [
  105. 'resource' => [
  106. 'location' => 'path',
  107. 'type' => 'string',
  108. 'required' => true,
  109. ],
  110. ],
  111. ],'list' => [
  112. 'path' => 'v1/accessPolicies',
  113. 'httpMethod' => 'GET',
  114. 'parameters' => [
  115. 'pageSize' => [
  116. 'location' => 'query',
  117. 'type' => 'integer',
  118. ],
  119. 'pageToken' => [
  120. 'location' => 'query',
  121. 'type' => 'string',
  122. ],
  123. 'parent' => [
  124. 'location' => 'query',
  125. 'type' => 'string',
  126. ],
  127. ],
  128. ],'patch' => [
  129. 'path' => 'v1/{+name}',
  130. 'httpMethod' => 'PATCH',
  131. 'parameters' => [
  132. 'name' => [
  133. 'location' => 'path',
  134. 'type' => 'string',
  135. 'required' => true,
  136. ],
  137. 'updateMask' => [
  138. 'location' => 'query',
  139. 'type' => 'string',
  140. ],
  141. ],
  142. ],'setIamPolicy' => [
  143. 'path' => 'v1/{+resource}:setIamPolicy',
  144. 'httpMethod' => 'POST',
  145. 'parameters' => [
  146. 'resource' => [
  147. 'location' => 'path',
  148. 'type' => 'string',
  149. 'required' => true,
  150. ],
  151. ],
  152. ],'testIamPermissions' => [
  153. 'path' => 'v1/{+resource}:testIamPermissions',
  154. 'httpMethod' => 'POST',
  155. 'parameters' => [
  156. 'resource' => [
  157. 'location' => 'path',
  158. 'type' => 'string',
  159. 'required' => true,
  160. ],
  161. ],
  162. ],
  163. ]
  164. ]
  165. );
  166. $this->accessPolicies_accessLevels = new AccessContextManager\Resource\AccessPoliciesAccessLevels(
  167. $this,
  168. $this->serviceName,
  169. 'accessLevels',
  170. [
  171. 'methods' => [
  172. 'create' => [
  173. 'path' => 'v1/{+parent}/accessLevels',
  174. 'httpMethod' => 'POST',
  175. 'parameters' => [
  176. 'parent' => [
  177. 'location' => 'path',
  178. 'type' => 'string',
  179. 'required' => true,
  180. ],
  181. ],
  182. ],'delete' => [
  183. 'path' => 'v1/{+name}',
  184. 'httpMethod' => 'DELETE',
  185. 'parameters' => [
  186. 'name' => [
  187. 'location' => 'path',
  188. 'type' => 'string',
  189. 'required' => true,
  190. ],
  191. ],
  192. ],'get' => [
  193. 'path' => 'v1/{+name}',
  194. 'httpMethod' => 'GET',
  195. 'parameters' => [
  196. 'name' => [
  197. 'location' => 'path',
  198. 'type' => 'string',
  199. 'required' => true,
  200. ],
  201. 'accessLevelFormat' => [
  202. 'location' => 'query',
  203. 'type' => 'string',
  204. ],
  205. ],
  206. ],'list' => [
  207. 'path' => 'v1/{+parent}/accessLevels',
  208. 'httpMethod' => 'GET',
  209. 'parameters' => [
  210. 'parent' => [
  211. 'location' => 'path',
  212. 'type' => 'string',
  213. 'required' => true,
  214. ],
  215. 'accessLevelFormat' => [
  216. 'location' => 'query',
  217. 'type' => 'string',
  218. ],
  219. 'pageSize' => [
  220. 'location' => 'query',
  221. 'type' => 'integer',
  222. ],
  223. 'pageToken' => [
  224. 'location' => 'query',
  225. 'type' => 'string',
  226. ],
  227. ],
  228. ],'patch' => [
  229. 'path' => 'v1/{+name}',
  230. 'httpMethod' => 'PATCH',
  231. 'parameters' => [
  232. 'name' => [
  233. 'location' => 'path',
  234. 'type' => 'string',
  235. 'required' => true,
  236. ],
  237. 'updateMask' => [
  238. 'location' => 'query',
  239. 'type' => 'string',
  240. ],
  241. ],
  242. ],'replaceAll' => [
  243. 'path' => 'v1/{+parent}/accessLevels:replaceAll',
  244. 'httpMethod' => 'POST',
  245. 'parameters' => [
  246. 'parent' => [
  247. 'location' => 'path',
  248. 'type' => 'string',
  249. 'required' => true,
  250. ],
  251. ],
  252. ],'testIamPermissions' => [
  253. 'path' => 'v1/{+resource}:testIamPermissions',
  254. 'httpMethod' => 'POST',
  255. 'parameters' => [
  256. 'resource' => [
  257. 'location' => 'path',
  258. 'type' => 'string',
  259. 'required' => true,
  260. ],
  261. ],
  262. ],
  263. ]
  264. ]
  265. );
  266. $this->accessPolicies_authorizedOrgsDescs = new AccessContextManager\Resource\AccessPoliciesAuthorizedOrgsDescs(
  267. $this,
  268. $this->serviceName,
  269. 'authorizedOrgsDescs',
  270. [
  271. 'methods' => [
  272. 'create' => [
  273. 'path' => 'v1/{+parent}/authorizedOrgsDescs',
  274. 'httpMethod' => 'POST',
  275. 'parameters' => [
  276. 'parent' => [
  277. 'location' => 'path',
  278. 'type' => 'string',
  279. 'required' => true,
  280. ],
  281. ],
  282. ],'delete' => [
  283. 'path' => 'v1/{+name}',
  284. 'httpMethod' => 'DELETE',
  285. 'parameters' => [
  286. 'name' => [
  287. 'location' => 'path',
  288. 'type' => 'string',
  289. 'required' => true,
  290. ],
  291. ],
  292. ],'get' => [
  293. 'path' => 'v1/{+name}',
  294. 'httpMethod' => 'GET',
  295. 'parameters' => [
  296. 'name' => [
  297. 'location' => 'path',
  298. 'type' => 'string',
  299. 'required' => true,
  300. ],
  301. ],
  302. ],'list' => [
  303. 'path' => 'v1/{+parent}/authorizedOrgsDescs',
  304. 'httpMethod' => 'GET',
  305. 'parameters' => [
  306. 'parent' => [
  307. 'location' => 'path',
  308. 'type' => 'string',
  309. 'required' => true,
  310. ],
  311. 'pageSize' => [
  312. 'location' => 'query',
  313. 'type' => 'integer',
  314. ],
  315. 'pageToken' => [
  316. 'location' => 'query',
  317. 'type' => 'string',
  318. ],
  319. ],
  320. ],'patch' => [
  321. 'path' => 'v1/{+name}',
  322. 'httpMethod' => 'PATCH',
  323. 'parameters' => [
  324. 'name' => [
  325. 'location' => 'path',
  326. 'type' => 'string',
  327. 'required' => true,
  328. ],
  329. 'updateMask' => [
  330. 'location' => 'query',
  331. 'type' => 'string',
  332. ],
  333. ],
  334. ],
  335. ]
  336. ]
  337. );
  338. $this->accessPolicies_servicePerimeters = new AccessContextManager\Resource\AccessPoliciesServicePerimeters(
  339. $this,
  340. $this->serviceName,
  341. 'servicePerimeters',
  342. [
  343. 'methods' => [
  344. 'commit' => [
  345. 'path' => 'v1/{+parent}/servicePerimeters:commit',
  346. 'httpMethod' => 'POST',
  347. 'parameters' => [
  348. 'parent' => [
  349. 'location' => 'path',
  350. 'type' => 'string',
  351. 'required' => true,
  352. ],
  353. ],
  354. ],'create' => [
  355. 'path' => 'v1/{+parent}/servicePerimeters',
  356. 'httpMethod' => 'POST',
  357. 'parameters' => [
  358. 'parent' => [
  359. 'location' => 'path',
  360. 'type' => 'string',
  361. 'required' => true,
  362. ],
  363. ],
  364. ],'delete' => [
  365. 'path' => 'v1/{+name}',
  366. 'httpMethod' => 'DELETE',
  367. 'parameters' => [
  368. 'name' => [
  369. 'location' => 'path',
  370. 'type' => 'string',
  371. 'required' => true,
  372. ],
  373. ],
  374. ],'get' => [
  375. 'path' => 'v1/{+name}',
  376. 'httpMethod' => 'GET',
  377. 'parameters' => [
  378. 'name' => [
  379. 'location' => 'path',
  380. 'type' => 'string',
  381. 'required' => true,
  382. ],
  383. ],
  384. ],'list' => [
  385. 'path' => 'v1/{+parent}/servicePerimeters',
  386. 'httpMethod' => 'GET',
  387. 'parameters' => [
  388. 'parent' => [
  389. 'location' => 'path',
  390. 'type' => 'string',
  391. 'required' => true,
  392. ],
  393. 'pageSize' => [
  394. 'location' => 'query',
  395. 'type' => 'integer',
  396. ],
  397. 'pageToken' => [
  398. 'location' => 'query',
  399. 'type' => 'string',
  400. ],
  401. ],
  402. ],'patch' => [
  403. 'path' => 'v1/{+name}',
  404. 'httpMethod' => 'PATCH',
  405. 'parameters' => [
  406. 'name' => [
  407. 'location' => 'path',
  408. 'type' => 'string',
  409. 'required' => true,
  410. ],
  411. 'updateMask' => [
  412. 'location' => 'query',
  413. 'type' => 'string',
  414. ],
  415. ],
  416. ],'replaceAll' => [
  417. 'path' => 'v1/{+parent}/servicePerimeters:replaceAll',
  418. 'httpMethod' => 'POST',
  419. 'parameters' => [
  420. 'parent' => [
  421. 'location' => 'path',
  422. 'type' => 'string',
  423. 'required' => true,
  424. ],
  425. ],
  426. ],'testIamPermissions' => [
  427. 'path' => 'v1/{+resource}:testIamPermissions',
  428. 'httpMethod' => 'POST',
  429. 'parameters' => [
  430. 'resource' => [
  431. 'location' => 'path',
  432. 'type' => 'string',
  433. 'required' => true,
  434. ],
  435. ],
  436. ],
  437. ]
  438. ]
  439. );
  440. $this->operations = new AccessContextManager\Resource\Operations(
  441. $this,
  442. $this->serviceName,
  443. 'operations',
  444. [
  445. 'methods' => [
  446. 'cancel' => [
  447. 'path' => 'v1/{+name}:cancel',
  448. 'httpMethod' => 'POST',
  449. 'parameters' => [
  450. 'name' => [
  451. 'location' => 'path',
  452. 'type' => 'string',
  453. 'required' => true,
  454. ],
  455. ],
  456. ],'delete' => [
  457. 'path' => 'v1/{+name}',
  458. 'httpMethod' => 'DELETE',
  459. 'parameters' => [
  460. 'name' => [
  461. 'location' => 'path',
  462. 'type' => 'string',
  463. 'required' => true,
  464. ],
  465. ],
  466. ],'get' => [
  467. 'path' => 'v1/{+name}',
  468. 'httpMethod' => 'GET',
  469. 'parameters' => [
  470. 'name' => [
  471. 'location' => 'path',
  472. 'type' => 'string',
  473. 'required' => true,
  474. ],
  475. ],
  476. ],'list' => [
  477. 'path' => 'v1/{+name}',
  478. 'httpMethod' => 'GET',
  479. 'parameters' => [
  480. 'name' => [
  481. 'location' => 'path',
  482. 'type' => 'string',
  483. 'required' => true,
  484. ],
  485. 'filter' => [
  486. 'location' => 'query',
  487. 'type' => 'string',
  488. ],
  489. 'pageSize' => [
  490. 'location' => 'query',
  491. 'type' => 'integer',
  492. ],
  493. 'pageToken' => [
  494. 'location' => 'query',
  495. 'type' => 'string',
  496. ],
  497. 'returnPartialSuccess' => [
  498. 'location' => 'query',
  499. 'type' => 'boolean',
  500. ],
  501. ],
  502. ],
  503. ]
  504. ]
  505. );
  506. $this->organizations_gcpUserAccessBindings = new AccessContextManager\Resource\OrganizationsGcpUserAccessBindings(
  507. $this,
  508. $this->serviceName,
  509. 'gcpUserAccessBindings',
  510. [
  511. 'methods' => [
  512. 'create' => [
  513. 'path' => 'v1/{+parent}/gcpUserAccessBindings',
  514. 'httpMethod' => 'POST',
  515. 'parameters' => [
  516. 'parent' => [
  517. 'location' => 'path',
  518. 'type' => 'string',
  519. 'required' => true,
  520. ],
  521. ],
  522. ],'delete' => [
  523. 'path' => 'v1/{+name}',
  524. 'httpMethod' => 'DELETE',
  525. 'parameters' => [
  526. 'name' => [
  527. 'location' => 'path',
  528. 'type' => 'string',
  529. 'required' => true,
  530. ],
  531. ],
  532. ],'get' => [
  533. 'path' => 'v1/{+name}',
  534. 'httpMethod' => 'GET',
  535. 'parameters' => [
  536. 'name' => [
  537. 'location' => 'path',
  538. 'type' => 'string',
  539. 'required' => true,
  540. ],
  541. ],
  542. ],'list' => [
  543. 'path' => 'v1/{+parent}/gcpUserAccessBindings',
  544. 'httpMethod' => 'GET',
  545. 'parameters' => [
  546. 'parent' => [
  547. 'location' => 'path',
  548. 'type' => 'string',
  549. 'required' => true,
  550. ],
  551. 'pageSize' => [
  552. 'location' => 'query',
  553. 'type' => 'integer',
  554. ],
  555. 'pageToken' => [
  556. 'location' => 'query',
  557. 'type' => 'string',
  558. ],
  559. ],
  560. ],'patch' => [
  561. 'path' => 'v1/{+name}',
  562. 'httpMethod' => 'PATCH',
  563. 'parameters' => [
  564. 'name' => [
  565. 'location' => 'path',
  566. 'type' => 'string',
  567. 'required' => true,
  568. ],
  569. 'append' => [
  570. 'location' => 'query',
  571. 'type' => 'boolean',
  572. ],
  573. 'updateMask' => [
  574. 'location' => 'query',
  575. 'type' => 'string',
  576. ],
  577. ],
  578. ],
  579. ]
  580. ]
  581. );
  582. $this->permissions = new AccessContextManager\Resource\Permissions(
  583. $this,
  584. $this->serviceName,
  585. 'permissions',
  586. [
  587. 'methods' => [
  588. 'list' => [
  589. 'path' => 'v1/permissions',
  590. 'httpMethod' => 'GET',
  591. 'parameters' => [
  592. 'pageSize' => [
  593. 'location' => 'query',
  594. 'type' => 'integer',
  595. ],
  596. 'pageToken' => [
  597. 'location' => 'query',
  598. 'type' => 'string',
  599. ],
  600. ],
  601. ],
  602. ]
  603. ]
  604. );
  605. $this->services = new AccessContextManager\Resource\Services(
  606. $this,
  607. $this->serviceName,
  608. 'services',
  609. [
  610. 'methods' => [
  611. 'get' => [
  612. 'path' => 'v1/services/{name}',
  613. 'httpMethod' => 'GET',
  614. 'parameters' => [
  615. 'name' => [
  616. 'location' => 'path',
  617. 'type' => 'string',
  618. 'required' => true,
  619. ],
  620. ],
  621. ],'list' => [
  622. 'path' => 'v1/services',
  623. 'httpMethod' => 'GET',
  624. 'parameters' => [
  625. 'pageSize' => [
  626. 'location' => 'query',
  627. 'type' => 'integer',
  628. ],
  629. 'pageToken' => [
  630. 'location' => 'query',
  631. 'type' => 'string',
  632. ],
  633. ],
  634. ],
  635. ]
  636. ]
  637. );
  638. }
  639. }
  640. // Adding a class alias for backwards compatibility with the previous class name.
  641. class_alias(AccessContextManager::class, 'Google_Service_AccessContextManager');