ContainerAnalysis.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  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 ContainerAnalysis (v1).
  21. *
  22. * <p>
  23. * An implementation of the Grafeas API, which stores, and enables querying and
  24. * retrieval of critical metadata about all of your software artifacts.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://cloud.google.com/container-analysis/api/reference/rest/" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class ContainerAnalysis 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_notes;
  39. public $projects_notes_occurrences;
  40. public $projects_occurrences;
  41. /**
  42. * Constructs the internal representation of the ContainerAnalysis service.
  43. *
  44. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  45. * config array to pass to a new Client instance.
  46. * @param string $rootUrl The root URL used for requests to the service.
  47. */
  48. public function __construct($clientOrConfig = [], $rootUrl = null)
  49. {
  50. parent::__construct($clientOrConfig);
  51. $this->rootUrl = $rootUrl ?: 'https://containeranalysis.googleapis.com/';
  52. $this->servicePath = '';
  53. $this->batchPath = 'batch';
  54. $this->version = 'v1';
  55. $this->serviceName = 'containeranalysis';
  56. $this->projects_notes = new ContainerAnalysis\Resource\ProjectsNotes(
  57. $this,
  58. $this->serviceName,
  59. 'notes',
  60. [
  61. 'methods' => [
  62. 'batchCreate' => [
  63. 'path' => 'v1/{+parent}/notes:batchCreate',
  64. 'httpMethod' => 'POST',
  65. 'parameters' => [
  66. 'parent' => [
  67. 'location' => 'path',
  68. 'type' => 'string',
  69. 'required' => true,
  70. ],
  71. ],
  72. ],'create' => [
  73. 'path' => 'v1/{+parent}/notes',
  74. 'httpMethod' => 'POST',
  75. 'parameters' => [
  76. 'parent' => [
  77. 'location' => 'path',
  78. 'type' => 'string',
  79. 'required' => true,
  80. ],
  81. 'noteId' => [
  82. 'location' => 'query',
  83. 'type' => 'string',
  84. ],
  85. ],
  86. ],'delete' => [
  87. 'path' => 'v1/{+name}',
  88. 'httpMethod' => 'DELETE',
  89. 'parameters' => [
  90. 'name' => [
  91. 'location' => 'path',
  92. 'type' => 'string',
  93. 'required' => true,
  94. ],
  95. ],
  96. ],'get' => [
  97. 'path' => 'v1/{+name}',
  98. 'httpMethod' => 'GET',
  99. 'parameters' => [
  100. 'name' => [
  101. 'location' => 'path',
  102. 'type' => 'string',
  103. 'required' => true,
  104. ],
  105. ],
  106. ],'getIamPolicy' => [
  107. 'path' => 'v1/{+resource}:getIamPolicy',
  108. 'httpMethod' => 'POST',
  109. 'parameters' => [
  110. 'resource' => [
  111. 'location' => 'path',
  112. 'type' => 'string',
  113. 'required' => true,
  114. ],
  115. ],
  116. ],'list' => [
  117. 'path' => 'v1/{+parent}/notes',
  118. 'httpMethod' => 'GET',
  119. 'parameters' => [
  120. 'parent' => [
  121. 'location' => 'path',
  122. 'type' => 'string',
  123. 'required' => true,
  124. ],
  125. 'filter' => [
  126. 'location' => 'query',
  127. 'type' => 'string',
  128. ],
  129. 'pageSize' => [
  130. 'location' => 'query',
  131. 'type' => 'integer',
  132. ],
  133. 'pageToken' => [
  134. 'location' => 'query',
  135. 'type' => 'string',
  136. ],
  137. ],
  138. ],'patch' => [
  139. 'path' => 'v1/{+name}',
  140. 'httpMethod' => 'PATCH',
  141. 'parameters' => [
  142. 'name' => [
  143. 'location' => 'path',
  144. 'type' => 'string',
  145. 'required' => true,
  146. ],
  147. 'updateMask' => [
  148. 'location' => 'query',
  149. 'type' => 'string',
  150. ],
  151. ],
  152. ],'setIamPolicy' => [
  153. 'path' => 'v1/{+resource}:setIamPolicy',
  154. 'httpMethod' => 'POST',
  155. 'parameters' => [
  156. 'resource' => [
  157. 'location' => 'path',
  158. 'type' => 'string',
  159. 'required' => true,
  160. ],
  161. ],
  162. ],'testIamPermissions' => [
  163. 'path' => 'v1/{+resource}:testIamPermissions',
  164. 'httpMethod' => 'POST',
  165. 'parameters' => [
  166. 'resource' => [
  167. 'location' => 'path',
  168. 'type' => 'string',
  169. 'required' => true,
  170. ],
  171. ],
  172. ],
  173. ]
  174. ]
  175. );
  176. $this->projects_notes_occurrences = new ContainerAnalysis\Resource\ProjectsNotesOccurrences(
  177. $this,
  178. $this->serviceName,
  179. 'occurrences',
  180. [
  181. 'methods' => [
  182. 'list' => [
  183. 'path' => 'v1/{+name}/occurrences',
  184. 'httpMethod' => 'GET',
  185. 'parameters' => [
  186. 'name' => [
  187. 'location' => 'path',
  188. 'type' => 'string',
  189. 'required' => true,
  190. ],
  191. 'filter' => [
  192. 'location' => 'query',
  193. 'type' => 'string',
  194. ],
  195. 'pageSize' => [
  196. 'location' => 'query',
  197. 'type' => 'integer',
  198. ],
  199. 'pageToken' => [
  200. 'location' => 'query',
  201. 'type' => 'string',
  202. ],
  203. ],
  204. ],
  205. ]
  206. ]
  207. );
  208. $this->projects_occurrences = new ContainerAnalysis\Resource\ProjectsOccurrences(
  209. $this,
  210. $this->serviceName,
  211. 'occurrences',
  212. [
  213. 'methods' => [
  214. 'batchCreate' => [
  215. 'path' => 'v1/{+parent}/occurrences:batchCreate',
  216. 'httpMethod' => 'POST',
  217. 'parameters' => [
  218. 'parent' => [
  219. 'location' => 'path',
  220. 'type' => 'string',
  221. 'required' => true,
  222. ],
  223. ],
  224. ],'create' => [
  225. 'path' => 'v1/{+parent}/occurrences',
  226. 'httpMethod' => 'POST',
  227. 'parameters' => [
  228. 'parent' => [
  229. 'location' => 'path',
  230. 'type' => 'string',
  231. 'required' => true,
  232. ],
  233. ],
  234. ],'delete' => [
  235. 'path' => 'v1/{+name}',
  236. 'httpMethod' => 'DELETE',
  237. 'parameters' => [
  238. 'name' => [
  239. 'location' => 'path',
  240. 'type' => 'string',
  241. 'required' => true,
  242. ],
  243. ],
  244. ],'get' => [
  245. 'path' => 'v1/{+name}',
  246. 'httpMethod' => 'GET',
  247. 'parameters' => [
  248. 'name' => [
  249. 'location' => 'path',
  250. 'type' => 'string',
  251. 'required' => true,
  252. ],
  253. ],
  254. ],'getIamPolicy' => [
  255. 'path' => 'v1/{+resource}:getIamPolicy',
  256. 'httpMethod' => 'POST',
  257. 'parameters' => [
  258. 'resource' => [
  259. 'location' => 'path',
  260. 'type' => 'string',
  261. 'required' => true,
  262. ],
  263. ],
  264. ],'getNotes' => [
  265. 'path' => 'v1/{+name}/notes',
  266. 'httpMethod' => 'GET',
  267. 'parameters' => [
  268. 'name' => [
  269. 'location' => 'path',
  270. 'type' => 'string',
  271. 'required' => true,
  272. ],
  273. ],
  274. ],'getVulnerabilitySummary' => [
  275. 'path' => 'v1/{+parent}/occurrences:vulnerabilitySummary',
  276. 'httpMethod' => 'GET',
  277. 'parameters' => [
  278. 'parent' => [
  279. 'location' => 'path',
  280. 'type' => 'string',
  281. 'required' => true,
  282. ],
  283. 'filter' => [
  284. 'location' => 'query',
  285. 'type' => 'string',
  286. ],
  287. ],
  288. ],'list' => [
  289. 'path' => 'v1/{+parent}/occurrences',
  290. 'httpMethod' => 'GET',
  291. 'parameters' => [
  292. 'parent' => [
  293. 'location' => 'path',
  294. 'type' => 'string',
  295. 'required' => true,
  296. ],
  297. 'filter' => [
  298. 'location' => 'query',
  299. 'type' => 'string',
  300. ],
  301. 'pageSize' => [
  302. 'location' => 'query',
  303. 'type' => 'integer',
  304. ],
  305. 'pageToken' => [
  306. 'location' => 'query',
  307. 'type' => 'string',
  308. ],
  309. ],
  310. ],'patch' => [
  311. 'path' => 'v1/{+name}',
  312. 'httpMethod' => 'PATCH',
  313. 'parameters' => [
  314. 'name' => [
  315. 'location' => 'path',
  316. 'type' => 'string',
  317. 'required' => true,
  318. ],
  319. 'updateMask' => [
  320. 'location' => 'query',
  321. 'type' => 'string',
  322. ],
  323. ],
  324. ],'setIamPolicy' => [
  325. 'path' => 'v1/{+resource}:setIamPolicy',
  326. 'httpMethod' => 'POST',
  327. 'parameters' => [
  328. 'resource' => [
  329. 'location' => 'path',
  330. 'type' => 'string',
  331. 'required' => true,
  332. ],
  333. ],
  334. ],'testIamPermissions' => [
  335. 'path' => 'v1/{+resource}:testIamPermissions',
  336. 'httpMethod' => 'POST',
  337. 'parameters' => [
  338. 'resource' => [
  339. 'location' => 'path',
  340. 'type' => 'string',
  341. 'required' => true,
  342. ],
  343. ],
  344. ],
  345. ]
  346. ]
  347. );
  348. }
  349. }
  350. // Adding a class alias for backwards compatibility with the previous class name.
  351. class_alias(ContainerAnalysis::class, 'Google_Service_ContainerAnalysis');