AccessApproval.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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 AccessApproval (v1).
  21. *
  22. * <p>
  23. * An API for controlling access to data by Google personnel.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://cloud.google.com/cloud-provider-access-management/access-approval/docs" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class AccessApproval extends \Google\Service
  33. {
  34. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. public $folders;
  38. public $folders_approvalRequests;
  39. public $organizations;
  40. public $organizations_approvalRequests;
  41. public $projects;
  42. public $projects_approvalRequests;
  43. /**
  44. * Constructs the internal representation of the AccessApproval service.
  45. *
  46. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  47. * config array to pass to a new Client instance.
  48. * @param string $rootUrl The root URL used for requests to the service.
  49. */
  50. public function __construct($clientOrConfig = [], $rootUrl = null)
  51. {
  52. parent::__construct($clientOrConfig);
  53. $this->rootUrl = $rootUrl ?: 'https://accessapproval.googleapis.com/';
  54. $this->servicePath = '';
  55. $this->batchPath = 'batch';
  56. $this->version = 'v1';
  57. $this->serviceName = 'accessapproval';
  58. $this->folders = new AccessApproval\Resource\Folders(
  59. $this,
  60. $this->serviceName,
  61. 'folders',
  62. [
  63. 'methods' => [
  64. 'deleteAccessApprovalSettings' => [
  65. 'path' => 'v1/{+name}',
  66. 'httpMethod' => 'DELETE',
  67. 'parameters' => [
  68. 'name' => [
  69. 'location' => 'path',
  70. 'type' => 'string',
  71. 'required' => true,
  72. ],
  73. ],
  74. ],'getAccessApprovalSettings' => [
  75. 'path' => 'v1/{+name}',
  76. 'httpMethod' => 'GET',
  77. 'parameters' => [
  78. 'name' => [
  79. 'location' => 'path',
  80. 'type' => 'string',
  81. 'required' => true,
  82. ],
  83. ],
  84. ],'getServiceAccount' => [
  85. 'path' => 'v1/{+name}',
  86. 'httpMethod' => 'GET',
  87. 'parameters' => [
  88. 'name' => [
  89. 'location' => 'path',
  90. 'type' => 'string',
  91. 'required' => true,
  92. ],
  93. ],
  94. ],'updateAccessApprovalSettings' => [
  95. 'path' => 'v1/{+name}',
  96. 'httpMethod' => 'PATCH',
  97. 'parameters' => [
  98. 'name' => [
  99. 'location' => 'path',
  100. 'type' => 'string',
  101. 'required' => true,
  102. ],
  103. 'updateMask' => [
  104. 'location' => 'query',
  105. 'type' => 'string',
  106. ],
  107. ],
  108. ],
  109. ]
  110. ]
  111. );
  112. $this->folders_approvalRequests = new AccessApproval\Resource\FoldersApprovalRequests(
  113. $this,
  114. $this->serviceName,
  115. 'approvalRequests',
  116. [
  117. 'methods' => [
  118. 'approve' => [
  119. 'path' => 'v1/{+name}:approve',
  120. 'httpMethod' => 'POST',
  121. 'parameters' => [
  122. 'name' => [
  123. 'location' => 'path',
  124. 'type' => 'string',
  125. 'required' => true,
  126. ],
  127. ],
  128. ],'dismiss' => [
  129. 'path' => 'v1/{+name}:dismiss',
  130. 'httpMethod' => 'POST',
  131. 'parameters' => [
  132. 'name' => [
  133. 'location' => 'path',
  134. 'type' => 'string',
  135. 'required' => true,
  136. ],
  137. ],
  138. ],'get' => [
  139. 'path' => 'v1/{+name}',
  140. 'httpMethod' => 'GET',
  141. 'parameters' => [
  142. 'name' => [
  143. 'location' => 'path',
  144. 'type' => 'string',
  145. 'required' => true,
  146. ],
  147. ],
  148. ],'invalidate' => [
  149. 'path' => 'v1/{+name}:invalidate',
  150. 'httpMethod' => 'POST',
  151. 'parameters' => [
  152. 'name' => [
  153. 'location' => 'path',
  154. 'type' => 'string',
  155. 'required' => true,
  156. ],
  157. ],
  158. ],'list' => [
  159. 'path' => 'v1/{+parent}/approvalRequests',
  160. 'httpMethod' => 'GET',
  161. 'parameters' => [
  162. 'parent' => [
  163. 'location' => 'path',
  164. 'type' => 'string',
  165. 'required' => true,
  166. ],
  167. 'filter' => [
  168. 'location' => 'query',
  169. 'type' => 'string',
  170. ],
  171. 'pageSize' => [
  172. 'location' => 'query',
  173. 'type' => 'integer',
  174. ],
  175. 'pageToken' => [
  176. 'location' => 'query',
  177. 'type' => 'string',
  178. ],
  179. ],
  180. ],
  181. ]
  182. ]
  183. );
  184. $this->organizations = new AccessApproval\Resource\Organizations(
  185. $this,
  186. $this->serviceName,
  187. 'organizations',
  188. [
  189. 'methods' => [
  190. 'deleteAccessApprovalSettings' => [
  191. 'path' => 'v1/{+name}',
  192. 'httpMethod' => 'DELETE',
  193. 'parameters' => [
  194. 'name' => [
  195. 'location' => 'path',
  196. 'type' => 'string',
  197. 'required' => true,
  198. ],
  199. ],
  200. ],'getAccessApprovalSettings' => [
  201. 'path' => 'v1/{+name}',
  202. 'httpMethod' => 'GET',
  203. 'parameters' => [
  204. 'name' => [
  205. 'location' => 'path',
  206. 'type' => 'string',
  207. 'required' => true,
  208. ],
  209. ],
  210. ],'getServiceAccount' => [
  211. 'path' => 'v1/{+name}',
  212. 'httpMethod' => 'GET',
  213. 'parameters' => [
  214. 'name' => [
  215. 'location' => 'path',
  216. 'type' => 'string',
  217. 'required' => true,
  218. ],
  219. ],
  220. ],'updateAccessApprovalSettings' => [
  221. 'path' => 'v1/{+name}',
  222. 'httpMethod' => 'PATCH',
  223. 'parameters' => [
  224. 'name' => [
  225. 'location' => 'path',
  226. 'type' => 'string',
  227. 'required' => true,
  228. ],
  229. 'updateMask' => [
  230. 'location' => 'query',
  231. 'type' => 'string',
  232. ],
  233. ],
  234. ],
  235. ]
  236. ]
  237. );
  238. $this->organizations_approvalRequests = new AccessApproval\Resource\OrganizationsApprovalRequests(
  239. $this,
  240. $this->serviceName,
  241. 'approvalRequests',
  242. [
  243. 'methods' => [
  244. 'approve' => [
  245. 'path' => 'v1/{+name}:approve',
  246. 'httpMethod' => 'POST',
  247. 'parameters' => [
  248. 'name' => [
  249. 'location' => 'path',
  250. 'type' => 'string',
  251. 'required' => true,
  252. ],
  253. ],
  254. ],'dismiss' => [
  255. 'path' => 'v1/{+name}:dismiss',
  256. 'httpMethod' => 'POST',
  257. 'parameters' => [
  258. 'name' => [
  259. 'location' => 'path',
  260. 'type' => 'string',
  261. 'required' => true,
  262. ],
  263. ],
  264. ],'get' => [
  265. 'path' => 'v1/{+name}',
  266. 'httpMethod' => 'GET',
  267. 'parameters' => [
  268. 'name' => [
  269. 'location' => 'path',
  270. 'type' => 'string',
  271. 'required' => true,
  272. ],
  273. ],
  274. ],'invalidate' => [
  275. 'path' => 'v1/{+name}:invalidate',
  276. 'httpMethod' => 'POST',
  277. 'parameters' => [
  278. 'name' => [
  279. 'location' => 'path',
  280. 'type' => 'string',
  281. 'required' => true,
  282. ],
  283. ],
  284. ],'list' => [
  285. 'path' => 'v1/{+parent}/approvalRequests',
  286. 'httpMethod' => 'GET',
  287. 'parameters' => [
  288. 'parent' => [
  289. 'location' => 'path',
  290. 'type' => 'string',
  291. 'required' => true,
  292. ],
  293. 'filter' => [
  294. 'location' => 'query',
  295. 'type' => 'string',
  296. ],
  297. 'pageSize' => [
  298. 'location' => 'query',
  299. 'type' => 'integer',
  300. ],
  301. 'pageToken' => [
  302. 'location' => 'query',
  303. 'type' => 'string',
  304. ],
  305. ],
  306. ],
  307. ]
  308. ]
  309. );
  310. $this->projects = new AccessApproval\Resource\Projects(
  311. $this,
  312. $this->serviceName,
  313. 'projects',
  314. [
  315. 'methods' => [
  316. 'deleteAccessApprovalSettings' => [
  317. 'path' => 'v1/{+name}',
  318. 'httpMethod' => 'DELETE',
  319. 'parameters' => [
  320. 'name' => [
  321. 'location' => 'path',
  322. 'type' => 'string',
  323. 'required' => true,
  324. ],
  325. ],
  326. ],'getAccessApprovalSettings' => [
  327. 'path' => 'v1/{+name}',
  328. 'httpMethod' => 'GET',
  329. 'parameters' => [
  330. 'name' => [
  331. 'location' => 'path',
  332. 'type' => 'string',
  333. 'required' => true,
  334. ],
  335. ],
  336. ],'getServiceAccount' => [
  337. 'path' => 'v1/{+name}',
  338. 'httpMethod' => 'GET',
  339. 'parameters' => [
  340. 'name' => [
  341. 'location' => 'path',
  342. 'type' => 'string',
  343. 'required' => true,
  344. ],
  345. ],
  346. ],'updateAccessApprovalSettings' => [
  347. 'path' => 'v1/{+name}',
  348. 'httpMethod' => 'PATCH',
  349. 'parameters' => [
  350. 'name' => [
  351. 'location' => 'path',
  352. 'type' => 'string',
  353. 'required' => true,
  354. ],
  355. 'updateMask' => [
  356. 'location' => 'query',
  357. 'type' => 'string',
  358. ],
  359. ],
  360. ],
  361. ]
  362. ]
  363. );
  364. $this->projects_approvalRequests = new AccessApproval\Resource\ProjectsApprovalRequests(
  365. $this,
  366. $this->serviceName,
  367. 'approvalRequests',
  368. [
  369. 'methods' => [
  370. 'approve' => [
  371. 'path' => 'v1/{+name}:approve',
  372. 'httpMethod' => 'POST',
  373. 'parameters' => [
  374. 'name' => [
  375. 'location' => 'path',
  376. 'type' => 'string',
  377. 'required' => true,
  378. ],
  379. ],
  380. ],'dismiss' => [
  381. 'path' => 'v1/{+name}:dismiss',
  382. 'httpMethod' => 'POST',
  383. 'parameters' => [
  384. 'name' => [
  385. 'location' => 'path',
  386. 'type' => 'string',
  387. 'required' => true,
  388. ],
  389. ],
  390. ],'get' => [
  391. 'path' => 'v1/{+name}',
  392. 'httpMethod' => 'GET',
  393. 'parameters' => [
  394. 'name' => [
  395. 'location' => 'path',
  396. 'type' => 'string',
  397. 'required' => true,
  398. ],
  399. ],
  400. ],'invalidate' => [
  401. 'path' => 'v1/{+name}:invalidate',
  402. 'httpMethod' => 'POST',
  403. 'parameters' => [
  404. 'name' => [
  405. 'location' => 'path',
  406. 'type' => 'string',
  407. 'required' => true,
  408. ],
  409. ],
  410. ],'list' => [
  411. 'path' => 'v1/{+parent}/approvalRequests',
  412. 'httpMethod' => 'GET',
  413. 'parameters' => [
  414. 'parent' => [
  415. 'location' => 'path',
  416. 'type' => 'string',
  417. 'required' => true,
  418. ],
  419. 'filter' => [
  420. 'location' => 'query',
  421. 'type' => 'string',
  422. ],
  423. 'pageSize' => [
  424. 'location' => 'query',
  425. 'type' => 'integer',
  426. ],
  427. 'pageToken' => [
  428. 'location' => 'query',
  429. 'type' => 'string',
  430. ],
  431. ],
  432. ],
  433. ]
  434. ]
  435. );
  436. }
  437. }
  438. // Adding a class alias for backwards compatibility with the previous class name.
  439. class_alias(AccessApproval::class, 'Google_Service_AccessApproval');