OSConfig.php 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  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 OSConfig (v1).
  21. *
  22. * <p>
  23. * OS management tools that can be used for patch management, patch compliance,
  24. * and configuration management on VM instances.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/compute/docs/osconfig/rest" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class OSConfig extends \Google\Service
  34. {
  35. /** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.. */
  36. const CLOUD_PLATFORM =
  37. "https://www.googleapis.com/auth/cloud-platform";
  38. public $projects_locations_instances_inventories;
  39. public $projects_locations_instances_osPolicyAssignments_reports;
  40. public $projects_locations_instances_vulnerabilityReports;
  41. public $projects_locations_osPolicyAssignments;
  42. public $projects_locations_osPolicyAssignments_operations;
  43. public $projects_patchDeployments;
  44. public $projects_patchJobs;
  45. public $projects_patchJobs_instanceDetails;
  46. /**
  47. * Constructs the internal representation of the OSConfig service.
  48. *
  49. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  50. * config array to pass to a new Client instance.
  51. * @param string $rootUrl The root URL used for requests to the service.
  52. */
  53. public function __construct($clientOrConfig = [], $rootUrl = null)
  54. {
  55. parent::__construct($clientOrConfig);
  56. $this->rootUrl = $rootUrl ?: 'https://osconfig.googleapis.com/';
  57. $this->servicePath = '';
  58. $this->batchPath = 'batch';
  59. $this->version = 'v1';
  60. $this->serviceName = 'osconfig';
  61. $this->projects_locations_instances_inventories = new OSConfig\Resource\ProjectsLocationsInstancesInventories(
  62. $this,
  63. $this->serviceName,
  64. 'inventories',
  65. [
  66. 'methods' => [
  67. 'get' => [
  68. 'path' => 'v1/{+name}',
  69. 'httpMethod' => 'GET',
  70. 'parameters' => [
  71. 'name' => [
  72. 'location' => 'path',
  73. 'type' => 'string',
  74. 'required' => true,
  75. ],
  76. 'view' => [
  77. 'location' => 'query',
  78. 'type' => 'string',
  79. ],
  80. ],
  81. ],'list' => [
  82. 'path' => 'v1/{+parent}/inventories',
  83. 'httpMethod' => 'GET',
  84. 'parameters' => [
  85. 'parent' => [
  86. 'location' => 'path',
  87. 'type' => 'string',
  88. 'required' => true,
  89. ],
  90. 'filter' => [
  91. 'location' => 'query',
  92. 'type' => 'string',
  93. ],
  94. 'pageSize' => [
  95. 'location' => 'query',
  96. 'type' => 'integer',
  97. ],
  98. 'pageToken' => [
  99. 'location' => 'query',
  100. 'type' => 'string',
  101. ],
  102. 'view' => [
  103. 'location' => 'query',
  104. 'type' => 'string',
  105. ],
  106. ],
  107. ],
  108. ]
  109. ]
  110. );
  111. $this->projects_locations_instances_osPolicyAssignments_reports = new OSConfig\Resource\ProjectsLocationsInstancesOsPolicyAssignmentsReports(
  112. $this,
  113. $this->serviceName,
  114. 'reports',
  115. [
  116. 'methods' => [
  117. 'get' => [
  118. 'path' => 'v1/{+name}',
  119. 'httpMethod' => 'GET',
  120. 'parameters' => [
  121. 'name' => [
  122. 'location' => 'path',
  123. 'type' => 'string',
  124. 'required' => true,
  125. ],
  126. ],
  127. ],'list' => [
  128. 'path' => 'v1/{+parent}/reports',
  129. 'httpMethod' => 'GET',
  130. 'parameters' => [
  131. 'parent' => [
  132. 'location' => 'path',
  133. 'type' => 'string',
  134. 'required' => true,
  135. ],
  136. 'filter' => [
  137. 'location' => 'query',
  138. 'type' => 'string',
  139. ],
  140. 'pageSize' => [
  141. 'location' => 'query',
  142. 'type' => 'integer',
  143. ],
  144. 'pageToken' => [
  145. 'location' => 'query',
  146. 'type' => 'string',
  147. ],
  148. ],
  149. ],
  150. ]
  151. ]
  152. );
  153. $this->projects_locations_instances_vulnerabilityReports = new OSConfig\Resource\ProjectsLocationsInstancesVulnerabilityReports(
  154. $this,
  155. $this->serviceName,
  156. 'vulnerabilityReports',
  157. [
  158. 'methods' => [
  159. 'get' => [
  160. 'path' => 'v1/{+name}',
  161. 'httpMethod' => 'GET',
  162. 'parameters' => [
  163. 'name' => [
  164. 'location' => 'path',
  165. 'type' => 'string',
  166. 'required' => true,
  167. ],
  168. ],
  169. ],'list' => [
  170. 'path' => 'v1/{+parent}/vulnerabilityReports',
  171. 'httpMethod' => 'GET',
  172. 'parameters' => [
  173. 'parent' => [
  174. 'location' => 'path',
  175. 'type' => 'string',
  176. 'required' => true,
  177. ],
  178. 'filter' => [
  179. 'location' => 'query',
  180. 'type' => 'string',
  181. ],
  182. 'pageSize' => [
  183. 'location' => 'query',
  184. 'type' => 'integer',
  185. ],
  186. 'pageToken' => [
  187. 'location' => 'query',
  188. 'type' => 'string',
  189. ],
  190. ],
  191. ],
  192. ]
  193. ]
  194. );
  195. $this->projects_locations_osPolicyAssignments = new OSConfig\Resource\ProjectsLocationsOsPolicyAssignments(
  196. $this,
  197. $this->serviceName,
  198. 'osPolicyAssignments',
  199. [
  200. 'methods' => [
  201. 'create' => [
  202. 'path' => 'v1/{+parent}/osPolicyAssignments',
  203. 'httpMethod' => 'POST',
  204. 'parameters' => [
  205. 'parent' => [
  206. 'location' => 'path',
  207. 'type' => 'string',
  208. 'required' => true,
  209. ],
  210. 'osPolicyAssignmentId' => [
  211. 'location' => 'query',
  212. 'type' => 'string',
  213. ],
  214. ],
  215. ],'delete' => [
  216. 'path' => 'v1/{+name}',
  217. 'httpMethod' => 'DELETE',
  218. 'parameters' => [
  219. 'name' => [
  220. 'location' => 'path',
  221. 'type' => 'string',
  222. 'required' => true,
  223. ],
  224. ],
  225. ],'get' => [
  226. 'path' => 'v1/{+name}',
  227. 'httpMethod' => 'GET',
  228. 'parameters' => [
  229. 'name' => [
  230. 'location' => 'path',
  231. 'type' => 'string',
  232. 'required' => true,
  233. ],
  234. ],
  235. ],'list' => [
  236. 'path' => 'v1/{+parent}/osPolicyAssignments',
  237. 'httpMethod' => 'GET',
  238. 'parameters' => [
  239. 'parent' => [
  240. 'location' => 'path',
  241. 'type' => 'string',
  242. 'required' => true,
  243. ],
  244. 'pageSize' => [
  245. 'location' => 'query',
  246. 'type' => 'integer',
  247. ],
  248. 'pageToken' => [
  249. 'location' => 'query',
  250. 'type' => 'string',
  251. ],
  252. ],
  253. ],'listRevisions' => [
  254. 'path' => 'v1/{+name}:listRevisions',
  255. 'httpMethod' => 'GET',
  256. 'parameters' => [
  257. 'name' => [
  258. 'location' => 'path',
  259. 'type' => 'string',
  260. 'required' => true,
  261. ],
  262. 'pageSize' => [
  263. 'location' => 'query',
  264. 'type' => 'integer',
  265. ],
  266. 'pageToken' => [
  267. 'location' => 'query',
  268. 'type' => 'string',
  269. ],
  270. ],
  271. ],'patch' => [
  272. 'path' => 'v1/{+name}',
  273. 'httpMethod' => 'PATCH',
  274. 'parameters' => [
  275. 'name' => [
  276. 'location' => 'path',
  277. 'type' => 'string',
  278. 'required' => true,
  279. ],
  280. 'updateMask' => [
  281. 'location' => 'query',
  282. 'type' => 'string',
  283. ],
  284. ],
  285. ],
  286. ]
  287. ]
  288. );
  289. $this->projects_locations_osPolicyAssignments_operations = new OSConfig\Resource\ProjectsLocationsOsPolicyAssignmentsOperations(
  290. $this,
  291. $this->serviceName,
  292. 'operations',
  293. [
  294. 'methods' => [
  295. 'cancel' => [
  296. 'path' => 'v1/{+name}:cancel',
  297. 'httpMethod' => 'POST',
  298. 'parameters' => [
  299. 'name' => [
  300. 'location' => 'path',
  301. 'type' => 'string',
  302. 'required' => true,
  303. ],
  304. ],
  305. ],'get' => [
  306. 'path' => 'v1/{+name}',
  307. 'httpMethod' => 'GET',
  308. 'parameters' => [
  309. 'name' => [
  310. 'location' => 'path',
  311. 'type' => 'string',
  312. 'required' => true,
  313. ],
  314. ],
  315. ],
  316. ]
  317. ]
  318. );
  319. $this->projects_patchDeployments = new OSConfig\Resource\ProjectsPatchDeployments(
  320. $this,
  321. $this->serviceName,
  322. 'patchDeployments',
  323. [
  324. 'methods' => [
  325. 'create' => [
  326. 'path' => 'v1/{+parent}/patchDeployments',
  327. 'httpMethod' => 'POST',
  328. 'parameters' => [
  329. 'parent' => [
  330. 'location' => 'path',
  331. 'type' => 'string',
  332. 'required' => true,
  333. ],
  334. 'patchDeploymentId' => [
  335. 'location' => 'query',
  336. 'type' => 'string',
  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}/patchDeployments',
  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. ],'patch' => [
  378. 'path' => 'v1/{+name}',
  379. 'httpMethod' => 'PATCH',
  380. 'parameters' => [
  381. 'name' => [
  382. 'location' => 'path',
  383. 'type' => 'string',
  384. 'required' => true,
  385. ],
  386. 'updateMask' => [
  387. 'location' => 'query',
  388. 'type' => 'string',
  389. ],
  390. ],
  391. ],'pause' => [
  392. 'path' => 'v1/{+name}:pause',
  393. 'httpMethod' => 'POST',
  394. 'parameters' => [
  395. 'name' => [
  396. 'location' => 'path',
  397. 'type' => 'string',
  398. 'required' => true,
  399. ],
  400. ],
  401. ],'resume' => [
  402. 'path' => 'v1/{+name}:resume',
  403. 'httpMethod' => 'POST',
  404. 'parameters' => [
  405. 'name' => [
  406. 'location' => 'path',
  407. 'type' => 'string',
  408. 'required' => true,
  409. ],
  410. ],
  411. ],
  412. ]
  413. ]
  414. );
  415. $this->projects_patchJobs = new OSConfig\Resource\ProjectsPatchJobs(
  416. $this,
  417. $this->serviceName,
  418. 'patchJobs',
  419. [
  420. 'methods' => [
  421. 'cancel' => [
  422. 'path' => 'v1/{+name}:cancel',
  423. 'httpMethod' => 'POST',
  424. 'parameters' => [
  425. 'name' => [
  426. 'location' => 'path',
  427. 'type' => 'string',
  428. 'required' => true,
  429. ],
  430. ],
  431. ],'execute' => [
  432. 'path' => 'v1/{+parent}/patchJobs:execute',
  433. 'httpMethod' => 'POST',
  434. 'parameters' => [
  435. 'parent' => [
  436. 'location' => 'path',
  437. 'type' => 'string',
  438. 'required' => true,
  439. ],
  440. ],
  441. ],'get' => [
  442. 'path' => 'v1/{+name}',
  443. 'httpMethod' => 'GET',
  444. 'parameters' => [
  445. 'name' => [
  446. 'location' => 'path',
  447. 'type' => 'string',
  448. 'required' => true,
  449. ],
  450. ],
  451. ],'list' => [
  452. 'path' => 'v1/{+parent}/patchJobs',
  453. 'httpMethod' => 'GET',
  454. 'parameters' => [
  455. 'parent' => [
  456. 'location' => 'path',
  457. 'type' => 'string',
  458. 'required' => true,
  459. ],
  460. 'filter' => [
  461. 'location' => 'query',
  462. 'type' => 'string',
  463. ],
  464. 'pageSize' => [
  465. 'location' => 'query',
  466. 'type' => 'integer',
  467. ],
  468. 'pageToken' => [
  469. 'location' => 'query',
  470. 'type' => 'string',
  471. ],
  472. ],
  473. ],
  474. ]
  475. ]
  476. );
  477. $this->projects_patchJobs_instanceDetails = new OSConfig\Resource\ProjectsPatchJobsInstanceDetails(
  478. $this,
  479. $this->serviceName,
  480. 'instanceDetails',
  481. [
  482. 'methods' => [
  483. 'list' => [
  484. 'path' => 'v1/{+parent}/instanceDetails',
  485. 'httpMethod' => 'GET',
  486. 'parameters' => [
  487. 'parent' => [
  488. 'location' => 'path',
  489. 'type' => 'string',
  490. 'required' => true,
  491. ],
  492. 'filter' => [
  493. 'location' => 'query',
  494. 'type' => 'string',
  495. ],
  496. 'pageSize' => [
  497. 'location' => 'query',
  498. 'type' => 'integer',
  499. ],
  500. 'pageToken' => [
  501. 'location' => 'query',
  502. 'type' => 'string',
  503. ],
  504. ],
  505. ],
  506. ]
  507. ]
  508. );
  509. }
  510. }
  511. // Adding a class alias for backwards compatibility with the previous class name.
  512. class_alias(OSConfig::class, 'Google_Service_OSConfig');