google-api-client 0.50.0 → 0.51.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (299) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release-please.yml +3 -1
  3. data/CHANGELOG.md +127 -0
  4. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  5. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +50 -6
  6. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +18 -0
  7. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +3 -1
  8. data/generated/google/apis/admob_v1.rb +1 -1
  9. data/generated/google/apis/admob_v1beta.rb +1 -1
  10. data/generated/google/apis/analyticsadmin_v1alpha.rb +1 -1
  11. data/generated/google/apis/analyticsadmin_v1alpha/service.rb +24 -8
  12. data/generated/google/apis/analyticsdata_v1alpha.rb +2 -2
  13. data/generated/google/apis/analyticsdata_v1alpha/classes.rb +93 -28
  14. data/generated/google/apis/analyticsdata_v1alpha/representations.rb +2 -0
  15. data/generated/google/apis/analyticsdata_v1alpha/service.rb +5 -5
  16. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  17. data/generated/google/apis/androidenterprise_v1/service.rb +4 -1
  18. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  19. data/generated/google/apis/androidmanagement_v1/classes.rb +69 -4
  20. data/generated/google/apis/androidmanagement_v1/representations.rb +19 -0
  21. data/generated/google/apis/androidpublisher_v3.rb +1 -1
  22. data/generated/google/apis/androidpublisher_v3/service.rb +4 -4
  23. data/generated/google/apis/apigee_v1.rb +1 -1
  24. data/generated/google/apis/apigee_v1/classes.rb +7 -7
  25. data/generated/google/apis/apigee_v1/service.rb +8 -7
  26. data/generated/google/apis/appengine_v1beta.rb +1 -1
  27. data/generated/google/apis/appengine_v1beta/classes.rb +8 -0
  28. data/generated/google/apis/appengine_v1beta/representations.rb +1 -0
  29. data/generated/google/apis/area120tables_v1alpha1.rb +4 -1
  30. data/generated/google/apis/artifactregistry_v1beta2.rb +38 -0
  31. data/generated/google/apis/artifactregistry_v1beta2/classes.rb +1037 -0
  32. data/generated/google/apis/artifactregistry_v1beta2/representations.rb +443 -0
  33. data/generated/google/apis/artifactregistry_v1beta2/service.rb +944 -0
  34. data/generated/google/apis/{assuredworkloads_v1beta1.rb → assuredworkloads_v1.rb} +6 -6
  35. data/generated/google/apis/{assuredworkloads_v1beta1 → assuredworkloads_v1}/classes.rb +49 -137
  36. data/generated/google/apis/{assuredworkloads_v1beta1 → assuredworkloads_v1}/representations.rb +27 -87
  37. data/generated/google/apis/{assuredworkloads_v1beta1 → assuredworkloads_v1}/service.rb +46 -46
  38. data/generated/google/apis/binaryauthorization_v1.rb +1 -1
  39. data/generated/google/apis/binaryauthorization_v1/classes.rb +0 -6
  40. data/generated/google/apis/binaryauthorization_v1/representations.rb +0 -1
  41. data/generated/google/apis/binaryauthorization_v1beta1.rb +1 -1
  42. data/generated/google/apis/binaryauthorization_v1beta1/classes.rb +2 -7
  43. data/generated/google/apis/binaryauthorization_v1beta1/representations.rb +0 -1
  44. data/generated/google/apis/chat_v1.rb +1 -1
  45. data/generated/google/apis/chat_v1/service.rb +176 -0
  46. data/generated/google/apis/cloudasset_v1.rb +1 -1
  47. data/generated/google/apis/cloudasset_v1/classes.rb +6 -3
  48. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  49. data/generated/google/apis/cloudbuild_v1/classes.rb +1 -1
  50. data/generated/google/apis/cloudbuild_v1/service.rb +1 -1
  51. data/generated/google/apis/cloudidentity_v1.rb +1 -1
  52. data/generated/google/apis/cloudidentity_v1/service.rb +8 -4
  53. data/generated/google/apis/cloudidentity_v1beta1.rb +1 -1
  54. data/generated/google/apis/cloudidentity_v1beta1/service.rb +8 -4
  55. data/generated/google/apis/cloudiot_v1.rb +1 -1
  56. data/generated/google/apis/cloudiot_v1/classes.rb +0 -6
  57. data/generated/google/apis/cloudiot_v1/representations.rb +0 -1
  58. data/generated/google/apis/cloudsearch_v1.rb +1 -1
  59. data/generated/google/apis/cloudsearch_v1/classes.rb +10 -5
  60. data/generated/google/apis/cloudtasks_v2.rb +1 -1
  61. data/generated/google/apis/cloudtasks_v2/classes.rb +0 -6
  62. data/generated/google/apis/cloudtasks_v2/representations.rb +0 -1
  63. data/generated/google/apis/cloudtasks_v2beta2.rb +1 -1
  64. data/generated/google/apis/cloudtasks_v2beta2/classes.rb +0 -6
  65. data/generated/google/apis/cloudtasks_v2beta2/representations.rb +0 -1
  66. data/generated/google/apis/cloudtasks_v2beta3.rb +1 -1
  67. data/generated/google/apis/cloudtasks_v2beta3/classes.rb +0 -6
  68. data/generated/google/apis/cloudtasks_v2beta3/representations.rb +0 -1
  69. data/generated/google/apis/composer_v1.rb +1 -1
  70. data/generated/google/apis/composer_v1/classes.rb +123 -0
  71. data/generated/google/apis/composer_v1/representations.rb +49 -0
  72. data/generated/google/apis/composer_v1/service.rb +19 -15
  73. data/generated/google/apis/composer_v1beta1.rb +1 -1
  74. data/generated/google/apis/composer_v1beta1/classes.rb +109 -0
  75. data/generated/google/apis/composer_v1beta1/representations.rb +46 -0
  76. data/generated/google/apis/composer_v1beta1/service.rb +39 -1
  77. data/generated/google/apis/compute_v1.rb +1 -1
  78. data/generated/google/apis/compute_v1/classes.rb +7 -2
  79. data/generated/google/apis/compute_v1/representations.rb +1 -0
  80. data/generated/google/apis/compute_v1/service.rb +691 -544
  81. data/generated/google/apis/containeranalysis_v1alpha1.rb +1 -1
  82. data/generated/google/apis/containeranalysis_v1alpha1/classes.rb +0 -6
  83. data/generated/google/apis/containeranalysis_v1alpha1/representations.rb +0 -1
  84. data/generated/google/apis/containeranalysis_v1beta1.rb +1 -1
  85. data/generated/google/apis/containeranalysis_v1beta1/classes.rb +2 -7
  86. data/generated/google/apis/containeranalysis_v1beta1/representations.rb +0 -1
  87. data/generated/google/apis/content_v2.rb +1 -1
  88. data/generated/google/apis/content_v2/classes.rb +4 -4
  89. data/generated/google/apis/content_v2_1.rb +1 -1
  90. data/generated/google/apis/content_v2_1/classes.rb +175 -4
  91. data/generated/google/apis/content_v2_1/representations.rb +78 -0
  92. data/generated/google/apis/content_v2_1/service.rb +179 -0
  93. data/generated/google/apis/datacatalog_v1beta1.rb +1 -1
  94. data/generated/google/apis/datacatalog_v1beta1/classes.rb +0 -6
  95. data/generated/google/apis/datacatalog_v1beta1/representations.rb +0 -1
  96. data/generated/google/apis/dataflow_v1b3.rb +1 -1
  97. data/generated/google/apis/dataflow_v1b3/classes.rb +17 -1
  98. data/generated/google/apis/dataflow_v1b3/representations.rb +2 -0
  99. data/generated/google/apis/dataproc_v1.rb +1 -1
  100. data/generated/google/apis/dataproc_v1/classes.rb +78 -6
  101. data/generated/google/apis/dataproc_v1/representations.rb +22 -1
  102. data/generated/google/apis/dataproc_v1beta2.rb +1 -1
  103. data/generated/google/apis/dataproc_v1beta2/classes.rb +46 -6
  104. data/generated/google/apis/dataproc_v1beta2/representations.rb +18 -1
  105. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  106. data/generated/google/apis/deploymentmanager_v2/classes.rb +0 -6
  107. data/generated/google/apis/deploymentmanager_v2/representations.rb +0 -1
  108. data/generated/google/apis/deploymentmanager_v2beta.rb +1 -1
  109. data/generated/google/apis/deploymentmanager_v2beta/classes.rb +0 -6
  110. data/generated/google/apis/deploymentmanager_v2beta/representations.rb +0 -1
  111. data/generated/google/apis/dialogflow_v2.rb +1 -1
  112. data/generated/google/apis/dialogflow_v2/classes.rb +15 -647
  113. data/generated/google/apis/dialogflow_v2/representations.rb +1 -299
  114. data/generated/google/apis/dialogflow_v2/service.rb +12 -4
  115. data/generated/google/apis/dialogflow_v2beta1.rb +1 -1
  116. data/generated/google/apis/dialogflow_v2beta1/classes.rb +13 -650
  117. data/generated/google/apis/dialogflow_v2beta1/representations.rb +1 -299
  118. data/generated/google/apis/dialogflow_v2beta1/service.rb +496 -32
  119. data/generated/google/apis/dialogflow_v3beta1.rb +1 -1
  120. data/generated/google/apis/dialogflow_v3beta1/classes.rb +15 -647
  121. data/generated/google/apis/dialogflow_v3beta1/representations.rb +1 -299
  122. data/generated/google/apis/dialogflow_v3beta1/service.rb +10 -2
  123. data/generated/google/apis/displayvideo_v1.rb +1 -1
  124. data/generated/google/apis/displayvideo_v1/classes.rb +97 -3
  125. data/generated/google/apis/displayvideo_v1/representations.rb +45 -0
  126. data/generated/google/apis/displayvideo_v1/service.rb +103 -39
  127. data/generated/google/apis/dns_v1.rb +1 -1
  128. data/generated/google/apis/dns_v1/classes.rb +6 -0
  129. data/generated/google/apis/dns_v1/representations.rb +1 -0
  130. data/generated/google/apis/dns_v1beta2.rb +1 -1
  131. data/generated/google/apis/dns_v1beta2/classes.rb +6 -0
  132. data/generated/google/apis/dns_v1beta2/representations.rb +1 -0
  133. data/generated/google/apis/doubleclickbidmanager_v1_1.rb +1 -1
  134. data/generated/google/apis/drive_v2.rb +1 -1
  135. data/generated/google/apis/drive_v2/classes.rb +4 -1
  136. data/generated/google/apis/drive_v2/service.rb +24 -56
  137. data/generated/google/apis/drive_v3.rb +1 -1
  138. data/generated/google/apis/drive_v3/classes.rb +4 -1
  139. data/generated/google/apis/drive_v3/service.rb +14 -30
  140. data/generated/google/apis/eventarc_v1beta1.rb +1 -1
  141. data/generated/google/apis/eventarc_v1beta1/classes.rb +0 -6
  142. data/generated/google/apis/eventarc_v1beta1/representations.rb +0 -1
  143. data/generated/google/apis/firebasedatabase_v1beta.rb +44 -0
  144. data/generated/google/apis/firebasedatabase_v1beta/classes.rb +130 -0
  145. data/generated/google/apis/firebasedatabase_v1beta/representations.rb +82 -0
  146. data/generated/google/apis/firebasedatabase_v1beta/service.rb +292 -0
  147. data/generated/google/apis/games_v1.rb +1 -1
  148. data/generated/google/apis/games_v1/classes.rb +67 -14
  149. data/generated/google/apis/games_v1/representations.rb +31 -2
  150. data/generated/google/apis/games_v1/service.rb +33 -0
  151. data/generated/google/apis/gmailpostmastertools_v1beta1.rb +1 -1
  152. data/generated/google/apis/gmailpostmastertools_v1beta1/classes.rb +9 -0
  153. data/generated/google/apis/gmailpostmastertools_v1beta1/representations.rb +1 -0
  154. data/generated/google/apis/healthcare_v1.rb +1 -1
  155. data/generated/google/apis/healthcare_v1/classes.rb +18 -17
  156. data/generated/google/apis/healthcare_v1beta1.rb +1 -1
  157. data/generated/google/apis/healthcare_v1beta1/classes.rb +18 -17
  158. data/generated/google/apis/iam_v1.rb +1 -1
  159. data/generated/google/apis/iam_v1/classes.rb +101 -0
  160. data/generated/google/apis/iam_v1/representations.rb +33 -0
  161. data/generated/google/apis/iam_v1/service.rb +62 -0
  162. data/generated/google/apis/jobs_v3.rb +1 -1
  163. data/generated/google/apis/jobs_v3/classes.rb +9 -807
  164. data/generated/google/apis/jobs_v3/representations.rb +0 -272
  165. data/generated/google/apis/jobs_v3p1beta1.rb +1 -1
  166. data/generated/google/apis/jobs_v3p1beta1/classes.rb +9 -768
  167. data/generated/google/apis/jobs_v3p1beta1/representations.rb +0 -257
  168. data/generated/google/apis/{jobs_v2.rb → jobs_v4.rb} +6 -6
  169. data/generated/google/apis/jobs_v4/classes.rb +2699 -0
  170. data/generated/google/apis/jobs_v4/representations.rb +934 -0
  171. data/generated/google/apis/jobs_v4/service.rb +903 -0
  172. data/generated/google/apis/licensing_v1.rb +1 -1
  173. data/generated/google/apis/licensing_v1/classes.rb +26 -8
  174. data/generated/google/apis/licensing_v1/representations.rb +12 -0
  175. data/generated/google/apis/licensing_v1/service.rb +32 -29
  176. data/generated/google/apis/lifesciences_v2beta.rb +1 -1
  177. data/generated/google/apis/lifesciences_v2beta/classes.rb +25 -0
  178. data/generated/google/apis/lifesciences_v2beta/representations.rb +15 -0
  179. data/generated/google/apis/logging_v2.rb +1 -1
  180. data/generated/google/apis/logging_v2/classes.rb +5 -4
  181. data/generated/google/apis/managedidentities_v1.rb +1 -1
  182. data/generated/google/apis/managedidentities_v1/classes.rb +16 -11
  183. data/generated/google/apis/managedidentities_v1/representations.rb +0 -1
  184. data/generated/google/apis/managedidentities_v1alpha1.rb +1 -1
  185. data/generated/google/apis/managedidentities_v1alpha1/classes.rb +18 -12
  186. data/generated/google/apis/managedidentities_v1alpha1/representations.rb +0 -1
  187. data/generated/google/apis/managedidentities_v1beta1.rb +1 -1
  188. data/generated/google/apis/managedidentities_v1beta1/classes.rb +4 -7
  189. data/generated/google/apis/managedidentities_v1beta1/representations.rb +0 -1
  190. data/generated/google/apis/ml_v1.rb +1 -1
  191. data/generated/google/apis/ml_v1/classes.rb +0 -6
  192. data/generated/google/apis/ml_v1/representations.rb +0 -1
  193. data/generated/google/apis/monitoring_v3.rb +1 -1
  194. data/generated/google/apis/monitoring_v3/classes.rb +5 -4
  195. data/generated/google/apis/monitoring_v3/service.rb +5 -4
  196. data/generated/google/apis/notebooks_v1.rb +1 -1
  197. data/generated/google/apis/notebooks_v1/classes.rb +0 -6
  198. data/generated/google/apis/notebooks_v1/representations.rb +0 -1
  199. data/generated/google/apis/osconfig_v1.rb +1 -1
  200. data/generated/google/apis/osconfig_v1/classes.rb +419 -0
  201. data/generated/google/apis/osconfig_v1/representations.rb +168 -0
  202. data/generated/google/apis/osconfig_v1beta.rb +1 -1
  203. data/generated/google/apis/osconfig_v1beta/classes.rb +419 -0
  204. data/generated/google/apis/osconfig_v1beta/representations.rb +168 -0
  205. data/generated/google/apis/pagespeedonline_v5.rb +1 -1
  206. data/generated/google/apis/pagespeedonline_v5/service.rb +3 -3
  207. data/generated/google/apis/people_v1.rb +1 -1
  208. data/generated/google/apis/people_v1/classes.rb +6 -2
  209. data/generated/google/apis/pubsub_v1.rb +1 -1
  210. data/generated/google/apis/pubsub_v1/classes.rb +0 -6
  211. data/generated/google/apis/pubsub_v1/representations.rb +0 -1
  212. data/generated/google/apis/pubsub_v1beta2.rb +1 -1
  213. data/generated/google/apis/pubsub_v1beta2/classes.rb +0 -6
  214. data/generated/google/apis/pubsub_v1beta2/representations.rb +0 -1
  215. data/generated/google/apis/recommender_v1.rb +1 -1
  216. data/generated/google/apis/recommender_v1/classes.rb +2 -2
  217. data/generated/google/apis/recommender_v1beta1.rb +1 -1
  218. data/generated/google/apis/recommender_v1beta1/classes.rb +2 -2
  219. data/generated/google/apis/remotebuildexecution_v1.rb +1 -1
  220. data/generated/google/apis/remotebuildexecution_v1/classes.rb +5 -30
  221. data/generated/google/apis/remotebuildexecution_v1/representations.rb +1 -16
  222. data/generated/google/apis/remotebuildexecution_v1alpha.rb +1 -1
  223. data/generated/google/apis/remotebuildexecution_v1alpha/classes.rb +5 -30
  224. data/generated/google/apis/remotebuildexecution_v1alpha/representations.rb +1 -16
  225. data/generated/google/apis/remotebuildexecution_v2.rb +1 -1
  226. data/generated/google/apis/remotebuildexecution_v2/classes.rb +5 -30
  227. data/generated/google/apis/remotebuildexecution_v2/representations.rb +1 -16
  228. data/generated/google/apis/reseller_v1.rb +4 -4
  229. data/generated/google/apis/reseller_v1/service.rb +5 -5
  230. data/generated/google/apis/run_v1.rb +1 -1
  231. data/generated/google/apis/run_v1/classes.rb +2 -1
  232. data/generated/google/apis/run_v1alpha1.rb +1 -1
  233. data/generated/google/apis/run_v1alpha1/classes.rb +2 -1
  234. data/generated/google/apis/securitycenter_v1.rb +1 -1
  235. data/generated/google/apis/securitycenter_v1/classes.rb +91 -0
  236. data/generated/google/apis/securitycenter_v1/representations.rb +37 -0
  237. data/generated/google/apis/securitycenter_v1/service.rb +1448 -414
  238. data/generated/google/apis/securitycenter_v1beta1.rb +1 -1
  239. data/generated/google/apis/securitycenter_v1beta1/classes.rb +68 -0
  240. data/generated/google/apis/securitycenter_v1beta1/representations.rb +32 -0
  241. data/generated/google/apis/securitycenter_v1beta2.rb +1 -1
  242. data/generated/google/apis/securitycenter_v1beta2/classes.rb +68 -0
  243. data/generated/google/apis/securitycenter_v1beta2/representations.rb +32 -0
  244. data/generated/google/apis/servicedirectory_v1beta1.rb +1 -1
  245. data/generated/google/apis/servicedirectory_v1beta1/classes.rb +0 -6
  246. data/generated/google/apis/servicedirectory_v1beta1/representations.rb +0 -1
  247. data/generated/google/apis/servicenetworking_v1.rb +1 -1
  248. data/generated/google/apis/servicenetworking_v1/classes.rb +56 -3
  249. data/generated/google/apis/servicenetworking_v1/representations.rb +19 -1
  250. data/generated/google/apis/servicenetworking_v1beta.rb +1 -1
  251. data/generated/google/apis/servicenetworking_v1beta/classes.rb +36 -3
  252. data/generated/google/apis/servicenetworking_v1beta/representations.rb +17 -1
  253. data/generated/google/apis/sheets_v4.rb +1 -1
  254. data/generated/google/apis/sheets_v4/classes.rb +309 -0
  255. data/generated/google/apis/sheets_v4/representations.rb +99 -0
  256. data/generated/google/apis/slides_v1.rb +1 -1
  257. data/generated/google/apis/spanner_v1.rb +1 -1
  258. data/generated/google/apis/spanner_v1/classes.rb +9 -6
  259. data/generated/google/apis/spanner_v1/representations.rb +1 -1
  260. data/generated/google/apis/speech_v1p1beta1.rb +1 -1
  261. data/generated/google/apis/speech_v1p1beta1/classes.rb +22 -0
  262. data/generated/google/apis/speech_v1p1beta1/representations.rb +2 -0
  263. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  264. data/generated/google/apis/sqladmin_v1beta4/classes.rb +90 -7
  265. data/generated/google/apis/sqladmin_v1beta4/representations.rb +34 -0
  266. data/generated/google/apis/sqladmin_v1beta4/service.rb +1 -1
  267. data/generated/google/apis/storage_v1.rb +1 -1
  268. data/generated/google/apis/storage_v1/classes.rb +7 -0
  269. data/generated/google/apis/storage_v1/representations.rb +1 -0
  270. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  271. data/generated/google/apis/storagetransfer_v1/classes.rb +14 -16
  272. data/generated/google/apis/vault_v1.rb +1 -1
  273. data/generated/google/apis/vault_v1/classes.rb +76 -0
  274. data/generated/google/apis/vault_v1/representations.rb +45 -0
  275. data/generated/google/apis/vectortile_v1.rb +1 -1
  276. data/generated/google/apis/vectortile_v1/classes.rb +59 -4
  277. data/generated/google/apis/vectortile_v1/representations.rb +19 -0
  278. data/generated/google/apis/videointelligence_v1.rb +1 -1
  279. data/generated/google/apis/videointelligence_v1/classes.rb +65 -0
  280. data/generated/google/apis/videointelligence_v1/representations.rb +15 -0
  281. data/generated/google/apis/videointelligence_v1beta2.rb +1 -1
  282. data/generated/google/apis/videointelligence_v1beta2/classes.rb +65 -0
  283. data/generated/google/apis/videointelligence_v1beta2/representations.rb +15 -0
  284. data/generated/google/apis/videointelligence_v1p1beta1.rb +1 -1
  285. data/generated/google/apis/videointelligence_v1p1beta1/classes.rb +65 -0
  286. data/generated/google/apis/videointelligence_v1p1beta1/representations.rb +15 -0
  287. data/generated/google/apis/videointelligence_v1p2beta1.rb +1 -1
  288. data/generated/google/apis/videointelligence_v1p2beta1/classes.rb +65 -0
  289. data/generated/google/apis/videointelligence_v1p2beta1/representations.rb +15 -0
  290. data/generated/google/apis/videointelligence_v1p3beta1.rb +1 -1
  291. data/generated/google/apis/videointelligence_v1p3beta1/classes.rb +65 -0
  292. data/generated/google/apis/videointelligence_v1p3beta1/representations.rb +15 -0
  293. data/generated/google/apis/youtube_v3.rb +1 -1
  294. data/generated/google/apis/youtube_v3/classes.rb +2 -2
  295. data/lib/google/apis/version.rb +1 -1
  296. metadata +19 -11
  297. data/generated/google/apis/jobs_v2/classes.rb +0 -4012
  298. data/generated/google/apis/jobs_v2/representations.rb +0 -1396
  299. data/generated/google/apis/jobs_v2/service.rb +0 -693
@@ -70,6 +70,12 @@ module Google
70
70
  include Google::Apis::Core::JsonObjectSupport
71
71
  end
72
72
 
73
+ class Folder
74
+ class Representation < Google::Apis::Core::JsonRepresentation; end
75
+
76
+ include Google::Apis::Core::JsonObjectSupport
77
+ end
78
+
73
79
  class GetIamPolicyRequest
74
80
  class Representation < Google::Apis::Core::JsonRepresentation; end
75
81
 
@@ -112,6 +118,12 @@ module Google
112
118
  include Google::Apis::Core::JsonObjectSupport
113
119
  end
114
120
 
121
+ class GoogleCloudSecuritycenterV1p1beta1Folder
122
+ class Representation < Google::Apis::Core::JsonRepresentation; end
123
+
124
+ include Google::Apis::Core::JsonObjectSupport
125
+ end
126
+
115
127
  class GoogleCloudSecuritycenterV1p1beta1NotificationMessage
116
128
  class Representation < Google::Apis::Core::JsonRepresentation; end
117
129
 
@@ -323,6 +335,7 @@ module Google
323
335
  class AssetDiscoveryConfig
324
336
  # @private
325
337
  class Representation < Google::Apis::Core::JsonRepresentation
338
+ collection :folder_ids, as: 'folderIds'
326
339
  property :inclusion_mode, as: 'inclusionMode'
327
340
  collection :project_ids, as: 'projectIds'
328
341
  end
@@ -388,6 +401,14 @@ module Google
388
401
  end
389
402
  end
390
403
 
404
+ class Folder
405
+ # @private
406
+ class Representation < Google::Apis::Core::JsonRepresentation
407
+ property :resource_folder, as: 'resourceFolder'
408
+ property :resource_folder_display_name, as: 'resourceFolderDisplayName'
409
+ end
410
+ end
411
+
391
412
  class GetIamPolicyRequest
392
413
  # @private
393
414
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -417,6 +438,8 @@ module Google
417
438
  class GoogleCloudSecuritycenterV1Resource
418
439
  # @private
419
440
  class Representation < Google::Apis::Core::JsonRepresentation
441
+ collection :folders, as: 'folders', class: Google::Apis::SecuritycenterV1::Folder, decorator: Google::Apis::SecuritycenterV1::Folder::Representation
442
+
420
443
  property :name, as: 'name'
421
444
  property :parent, as: 'parent'
422
445
  property :parent_display_name, as: 'parentDisplayName'
@@ -459,6 +482,14 @@ module Google
459
482
  end
460
483
  end
461
484
 
485
+ class GoogleCloudSecuritycenterV1p1beta1Folder
486
+ # @private
487
+ class Representation < Google::Apis::Core::JsonRepresentation
488
+ property :resource_folder, as: 'resourceFolder'
489
+ property :resource_folder_display_name, as: 'resourceFolderDisplayName'
490
+ end
491
+ end
492
+
462
493
  class GoogleCloudSecuritycenterV1p1beta1NotificationMessage
463
494
  # @private
464
495
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -473,6 +504,8 @@ module Google
473
504
  class GoogleCloudSecuritycenterV1p1beta1Resource
474
505
  # @private
475
506
  class Representation < Google::Apis::Core::JsonRepresentation
507
+ collection :folders, as: 'folders', class: Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1p1beta1Folder, decorator: Google::Apis::SecuritycenterV1::GoogleCloudSecuritycenterV1p1beta1Folder::Representation
508
+
476
509
  property :name, as: 'name'
477
510
  property :parent, as: 'parent'
478
511
  property :parent_display_name, as: 'parentDisplayName'
@@ -676,6 +709,8 @@ module Google
676
709
  class Resource
677
710
  # @private
678
711
  class Representation < Google::Apis::Core::JsonRepresentation
712
+ collection :folders, as: 'folders', class: Google::Apis::SecuritycenterV1::Folder, decorator: Google::Apis::SecuritycenterV1::Folder::Representation
713
+
679
714
  property :name, as: 'name'
680
715
  property :parent_display_name, as: 'parentDisplayName'
681
716
  property :parent_name, as: 'parentName'
@@ -693,6 +728,8 @@ module Google
693
728
  class SecurityCenterProperties
694
729
  # @private
695
730
  class Representation < Google::Apis::Core::JsonRepresentation
731
+ collection :folders, as: 'folders', class: Google::Apis::SecuritycenterV1::Folder, decorator: Google::Apis::SecuritycenterV1::Folder::Representation
732
+
696
733
  property :resource_display_name, as: 'resourceDisplayName'
697
734
  property :resource_name, as: 'resourceName'
698
735
  collection :resource_owners, as: 'resourceOwners'
@@ -48,80 +48,10 @@ module Google
48
48
  @batch_path = 'batch'
49
49
  end
50
50
 
51
- # Gets the settings for an organization.
52
- # @param [String] name
53
- # Required. Name of the organization to get organization settings for. Its
54
- # format is "organizations/[organization_id]/organizationSettings".
55
- # @param [String] fields
56
- # Selector specifying which fields to include in a partial response.
57
- # @param [String] quota_user
58
- # Available to use for quota purposes for server-side applications. Can be any
59
- # arbitrary string assigned to a user, but should not exceed 40 characters.
60
- # @param [Google::Apis::RequestOptions] options
61
- # Request-specific options
62
- #
63
- # @yield [result, err] Result & error if block supplied
64
- # @yieldparam result [Google::Apis::SecuritycenterV1::OrganizationSettings] parsed result object
65
- # @yieldparam err [StandardError] error object if request failed
66
- #
67
- # @return [Google::Apis::SecuritycenterV1::OrganizationSettings]
68
- #
69
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
- # @raise [Google::Apis::AuthorizationError] Authorization is required
72
- def get_organization_organization_settings(name, fields: nil, quota_user: nil, options: nil, &block)
73
- command = make_simple_command(:get, 'v1/{+name}', options)
74
- command.response_representation = Google::Apis::SecuritycenterV1::OrganizationSettings::Representation
75
- command.response_class = Google::Apis::SecuritycenterV1::OrganizationSettings
76
- command.params['name'] = name unless name.nil?
77
- command.query['fields'] = fields unless fields.nil?
78
- command.query['quotaUser'] = quota_user unless quota_user.nil?
79
- execute_or_queue_command(command, &block)
80
- end
81
-
82
- # Updates an organization's settings.
83
- # @param [String] name
84
- # The relative resource name of the settings. See: https://cloud.google.com/apis/
85
- # design/resource_names#relative_resource_name Example: "organizations/`
86
- # organization_id`/organizationSettings".
87
- # @param [Google::Apis::SecuritycenterV1::OrganizationSettings] organization_settings_object
88
- # @param [String] update_mask
89
- # The FieldMask to use when updating the settings resource. If empty all mutable
90
- # fields will be updated.
91
- # @param [String] fields
92
- # Selector specifying which fields to include in a partial response.
93
- # @param [String] quota_user
94
- # Available to use for quota purposes for server-side applications. Can be any
95
- # arbitrary string assigned to a user, but should not exceed 40 characters.
96
- # @param [Google::Apis::RequestOptions] options
97
- # Request-specific options
98
- #
99
- # @yield [result, err] Result & error if block supplied
100
- # @yieldparam result [Google::Apis::SecuritycenterV1::OrganizationSettings] parsed result object
101
- # @yieldparam err [StandardError] error object if request failed
102
- #
103
- # @return [Google::Apis::SecuritycenterV1::OrganizationSettings]
104
- #
105
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
- # @raise [Google::Apis::AuthorizationError] Authorization is required
108
- def update_organization_organization_settings(name, organization_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
109
- command = make_simple_command(:patch, 'v1/{+name}', options)
110
- command.request_representation = Google::Apis::SecuritycenterV1::OrganizationSettings::Representation
111
- command.request_object = organization_settings_object
112
- command.response_representation = Google::Apis::SecuritycenterV1::OrganizationSettings::Representation
113
- command.response_class = Google::Apis::SecuritycenterV1::OrganizationSettings
114
- command.params['name'] = name unless name.nil?
115
- command.query['updateMask'] = update_mask unless update_mask.nil?
116
- command.query['fields'] = fields unless fields.nil?
117
- command.query['quotaUser'] = quota_user unless quota_user.nil?
118
- execute_or_queue_command(command, &block)
119
- end
120
-
121
51
  # Filters an organization's assets and groups them by their specified properties.
122
52
  # @param [String] parent
123
53
  # Required. Name of the organization to groupBy. Its format is "organizations/[
124
- # organization_id]".
54
+ # organization_id], folders/[folder_id], or projects/[project_id]".
125
55
  # @param [Google::Apis::SecuritycenterV1::GroupAssetsRequest] group_assets_request_object
126
56
  # @param [String] fields
127
57
  # Selector specifying which fields to include in a partial response.
@@ -140,7 +70,7 @@ module Google
140
70
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
71
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
72
  # @raise [Google::Apis::AuthorizationError] Authorization is required
143
- def group_assets(parent, group_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
73
+ def group_folder_asset(parent, group_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
144
74
  command = make_simple_command(:post, 'v1/{+parent}/assets:group', options)
145
75
  command.request_representation = Google::Apis::SecuritycenterV1::GroupAssetsRequest::Representation
146
76
  command.request_object = group_assets_request_object
@@ -155,7 +85,8 @@ module Google
155
85
  # Lists an organization's assets.
156
86
  # @param [String] parent
157
87
  # Required. Name of the organization assets should belong to. Its format is "
158
- # organizations/[organization_id]".
88
+ # organizations/[organization_id], folders/[folder_id], or projects/[project_id]"
89
+ # .
159
90
  # @param [String] compare_duration
160
91
  # When compare_duration is set, the ListAssetsResult's "state_change" attribute
161
92
  # is updated to indicate whether the asset was added, removed, or remained
@@ -251,7 +182,7 @@ module Google
251
182
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
252
183
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
253
184
  # @raise [Google::Apis::AuthorizationError] Authorization is required
254
- def list_organization_assets(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
185
+ def list_folder_assets(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
255
186
  command = make_simple_command(:get, 'v1/{+parent}/assets', options)
256
187
  command.response_representation = Google::Apis::SecuritycenterV1::ListAssetsResponse::Representation
257
188
  command.response_class = Google::Apis::SecuritycenterV1::ListAssetsResponse
@@ -268,42 +199,6 @@ module Google
268
199
  execute_or_queue_command(command, &block)
269
200
  end
270
201
 
271
- # Runs asset discovery. The discovery is tracked with a long-running operation.
272
- # This API can only be called with limited frequency for an organization. If it
273
- # is called too frequently the caller will receive a TOO_MANY_REQUESTS error.
274
- # @param [String] parent
275
- # Required. Name of the organization to run asset discovery for. Its format is "
276
- # organizations/[organization_id]".
277
- # @param [Google::Apis::SecuritycenterV1::RunAssetDiscoveryRequest] run_asset_discovery_request_object
278
- # @param [String] fields
279
- # Selector specifying which fields to include in a partial response.
280
- # @param [String] quota_user
281
- # Available to use for quota purposes for server-side applications. Can be any
282
- # arbitrary string assigned to a user, but should not exceed 40 characters.
283
- # @param [Google::Apis::RequestOptions] options
284
- # Request-specific options
285
- #
286
- # @yield [result, err] Result & error if block supplied
287
- # @yieldparam result [Google::Apis::SecuritycenterV1::Operation] parsed result object
288
- # @yieldparam err [StandardError] error object if request failed
289
- #
290
- # @return [Google::Apis::SecuritycenterV1::Operation]
291
- #
292
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
293
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
294
- # @raise [Google::Apis::AuthorizationError] Authorization is required
295
- def run_organization_asset_discovery(parent, run_asset_discovery_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
296
- command = make_simple_command(:post, 'v1/{+parent}/assets:runDiscovery', options)
297
- command.request_representation = Google::Apis::SecuritycenterV1::RunAssetDiscoveryRequest::Representation
298
- command.request_object = run_asset_discovery_request_object
299
- command.response_representation = Google::Apis::SecuritycenterV1::Operation::Representation
300
- command.response_class = Google::Apis::SecuritycenterV1::Operation
301
- command.params['parent'] = parent unless parent.nil?
302
- command.query['fields'] = fields unless fields.nil?
303
- command.query['quotaUser'] = quota_user unless quota_user.nil?
304
- execute_or_queue_command(command, &block)
305
- end
306
-
307
202
  # Updates security marks.
308
203
  # @param [String] name
309
204
  # The relative resource name of the SecurityMarks. See: https://cloud.google.com/
@@ -336,7 +231,7 @@ module Google
336
231
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
337
232
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
338
233
  # @raise [Google::Apis::AuthorizationError] Authorization is required
339
- def update_organization_asset_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
234
+ def update_folder_asset_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
340
235
  command = make_simple_command(:patch, 'v1/{+name}', options)
341
236
  command.request_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
342
237
  command.request_object = security_marks_object
@@ -350,15 +245,18 @@ module Google
350
245
  execute_or_queue_command(command, &block)
351
246
  end
352
247
 
353
- # Creates a notification config.
248
+ # Lists all sources belonging to an organization.
354
249
  # @param [String] parent
355
- # Required. Resource name of the new notification config's parent. Its format is
356
- # "organizations/[organization_id]".
357
- # @param [Google::Apis::SecuritycenterV1::NotificationConfig] notification_config_object
358
- # @param [String] config_id
359
- # Required. Unique identifier provided by the client within the parent scope. It
360
- # must be between 1 and 128 characters, and contains alphanumeric characters,
361
- # underscores or hyphens only.
250
+ # Required. Resource name of the parent of sources to list. Its format should be
251
+ # "organizations/[organization_id], folders/[folder_id], or projects/[project_id]
252
+ # ".
253
+ # @param [Fixnum] page_size
254
+ # The maximum number of results to return in a single response. Default is 10,
255
+ # minimum is 1, maximum is 1000.
256
+ # @param [String] page_token
257
+ # The value returned by the last `ListSourcesResponse`; indicates that this is a
258
+ # continuation of a prior `ListSources` call, and that the system should return
259
+ # the next page of data.
362
260
  # @param [String] fields
363
261
  # Selector specifying which fields to include in a partial response.
364
262
  # @param [String] quota_user
@@ -368,31 +266,38 @@ module Google
368
266
  # Request-specific options
369
267
  #
370
268
  # @yield [result, err] Result & error if block supplied
371
- # @yieldparam result [Google::Apis::SecuritycenterV1::NotificationConfig] parsed result object
269
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListSourcesResponse] parsed result object
372
270
  # @yieldparam err [StandardError] error object if request failed
373
271
  #
374
- # @return [Google::Apis::SecuritycenterV1::NotificationConfig]
272
+ # @return [Google::Apis::SecuritycenterV1::ListSourcesResponse]
375
273
  #
376
274
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
377
275
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
378
276
  # @raise [Google::Apis::AuthorizationError] Authorization is required
379
- def create_organization_notification_config(parent, notification_config_object = nil, config_id: nil, fields: nil, quota_user: nil, options: nil, &block)
380
- command = make_simple_command(:post, 'v1/{+parent}/notificationConfigs', options)
381
- command.request_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
382
- command.request_object = notification_config_object
383
- command.response_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
384
- command.response_class = Google::Apis::SecuritycenterV1::NotificationConfig
277
+ def list_folder_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
278
+ command = make_simple_command(:get, 'v1/{+parent}/sources', options)
279
+ command.response_representation = Google::Apis::SecuritycenterV1::ListSourcesResponse::Representation
280
+ command.response_class = Google::Apis::SecuritycenterV1::ListSourcesResponse
385
281
  command.params['parent'] = parent unless parent.nil?
386
- command.query['configId'] = config_id unless config_id.nil?
282
+ command.query['pageSize'] = page_size unless page_size.nil?
283
+ command.query['pageToken'] = page_token unless page_token.nil?
387
284
  command.query['fields'] = fields unless fields.nil?
388
285
  command.query['quotaUser'] = quota_user unless quota_user.nil?
389
286
  execute_or_queue_command(command, &block)
390
287
  end
391
288
 
392
- # Deletes a notification config.
393
- # @param [String] name
394
- # Required. Name of the notification config to delete. Its format is "
395
- # organizations/[organization_id]/notificationConfigs/[config_id]".
289
+ # Filters an organization or source's findings and groups them by their
290
+ # specified properties. To group across all sources provide a `-` as the source
291
+ # id. Example: /v1/organizations/`organization_id`/sources/-/findings, /v1/
292
+ # folders/`folder_id`/sources/-/findings, /v1/projects/`project_id`/sources/-/
293
+ # findings
294
+ # @param [String] parent
295
+ # Required. Name of the source to groupBy. Its format is "organizations/[
296
+ # organization_id]/sources/[source_id]", folders/[folder_id]/sources/[source_id],
297
+ # or projects/[project_id]/sources/[source_id]. To groupBy across all sources
298
+ # provide a source_id of `-`. For example: organizations/`organization_id`/
299
+ # sources/-, folders/`folder_id`/sources/-, or projects/`project_id`/sources/-
300
+ # @param [Google::Apis::SecuritycenterV1::GroupFindingsRequest] group_findings_request_object
396
301
  # @param [String] fields
397
302
  # Selector specifying which fields to include in a partial response.
398
303
  # @param [String] quota_user
@@ -402,28 +307,102 @@ module Google
402
307
  # Request-specific options
403
308
  #
404
309
  # @yield [result, err] Result & error if block supplied
405
- # @yieldparam result [Google::Apis::SecuritycenterV1::Empty] parsed result object
310
+ # @yieldparam result [Google::Apis::SecuritycenterV1::GroupFindingsResponse] parsed result object
406
311
  # @yieldparam err [StandardError] error object if request failed
407
312
  #
408
- # @return [Google::Apis::SecuritycenterV1::Empty]
313
+ # @return [Google::Apis::SecuritycenterV1::GroupFindingsResponse]
409
314
  #
410
315
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
411
316
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
412
317
  # @raise [Google::Apis::AuthorizationError] Authorization is required
413
- def delete_organization_notification_config(name, fields: nil, quota_user: nil, options: nil, &block)
414
- command = make_simple_command(:delete, 'v1/{+name}', options)
415
- command.response_representation = Google::Apis::SecuritycenterV1::Empty::Representation
416
- command.response_class = Google::Apis::SecuritycenterV1::Empty
417
- command.params['name'] = name unless name.nil?
318
+ def group_folder_source_finding(parent, group_findings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
319
+ command = make_simple_command(:post, 'v1/{+parent}/findings:group', options)
320
+ command.request_representation = Google::Apis::SecuritycenterV1::GroupFindingsRequest::Representation
321
+ command.request_object = group_findings_request_object
322
+ command.response_representation = Google::Apis::SecuritycenterV1::GroupFindingsResponse::Representation
323
+ command.response_class = Google::Apis::SecuritycenterV1::GroupFindingsResponse
324
+ command.params['parent'] = parent unless parent.nil?
418
325
  command.query['fields'] = fields unless fields.nil?
419
326
  command.query['quotaUser'] = quota_user unless quota_user.nil?
420
327
  execute_or_queue_command(command, &block)
421
328
  end
422
329
 
423
- # Gets a notification config.
424
- # @param [String] name
425
- # Required. Name of the notification config to get. Its format is "organizations/
426
- # [organization_id]/notificationConfigs/[config_id]".
330
+ # Lists an organization or source's findings. To list across all sources provide
331
+ # a `-` as the source id. Example: /v1/organizations/`organization_id`/sources/-/
332
+ # findings
333
+ # @param [String] parent
334
+ # Required. Name of the source the findings belong to. Its format is "
335
+ # organizations/[organization_id]/sources/[source_id], folders/[folder_id]/
336
+ # sources/[source_id], or projects/[project_id]/sources/[source_id]". To list
337
+ # across all sources provide a source_id of `-`. For example: organizations/`
338
+ # organization_id`/sources/-, folders/`folder_id`/sources/- or projects/`
339
+ # projects_id`/sources/-
340
+ # @param [String] compare_duration
341
+ # When compare_duration is set, the ListFindingsResult's "state_change"
342
+ # attribute is updated to indicate whether the finding had its state changed,
343
+ # the finding's state remained unchanged, or if the finding was added in any
344
+ # state during the compare_duration period of time that precedes the read_time.
345
+ # This is the time between (read_time - compare_duration) and read_time. The
346
+ # state_change value is derived based on the presence and state of the finding
347
+ # at the two points in time. Intermediate state changes between the two times
348
+ # don't affect the result. For example, the results aren't affected if the
349
+ # finding is made inactive and then active again. Possible "state_change" values
350
+ # when compare_duration is specified: * "CHANGED": indicates that the finding
351
+ # was present and matched the given filter at the start of compare_duration, but
352
+ # changed its state at read_time. * "UNCHANGED": indicates that the finding was
353
+ # present and matched the given filter at the start of compare_duration and did
354
+ # not change state at read_time. * "ADDED": indicates that the finding did not
355
+ # match the given filter or was not present at the start of compare_duration,
356
+ # but was present at read_time. * "REMOVED": indicates that the finding was
357
+ # present and matched the filter at the start of compare_duration, but did not
358
+ # match the filter at read_time. If compare_duration is not specified, then the
359
+ # only possible state_change is "UNUSED", which will be the state_change set for
360
+ # all findings present at read_time.
361
+ # @param [String] field_mask
362
+ # A field mask to specify the Finding fields to be listed in the response. An
363
+ # empty field mask will list all fields.
364
+ # @param [String] filter
365
+ # Expression that defines the filter to apply across findings. The expression is
366
+ # a list of one or more restrictions combined via logical operators `AND` and `
367
+ # OR`. Parentheses are supported, and `OR` has higher precedence than `AND`.
368
+ # Restrictions have the form ` ` and may have a `-` character in front of them
369
+ # to indicate negation. Examples include: * name * source_properties.a_property *
370
+ # security_marks.marks.marka The supported operators are: * `=` for all value
371
+ # types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring
372
+ # matching, for strings. The supported value types are: * string literals in
373
+ # quotes. * integer literals without quotes. * boolean literals `true` and `
374
+ # false` without quotes. The following field and operator combinations are
375
+ # supported: name: `=` parent: `=`, `:` resource_name: `=`, `:` state: `=`, `:`
376
+ # category: `=`, `:` external_uri: `=`, `:` event_time: `=`, `>`, `<`, `>=`, `<=`
377
+ # Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
378
+ # `event_time = "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000`
379
+ # security_marks.marks: `=`, `:` source_properties: `=`, `:`, `>`, `<`, `>=`, `<=
380
+ # ` For example, `source_properties.size = 100` is a valid filter string. Use a
381
+ # partial match on the empty string to filter based on a property existing: `
382
+ # source_properties.my_property : ""` Use a negated partial match on the empty
383
+ # string to filter based on a property not existing: `-source_properties.
384
+ # my_property : ""`
385
+ # @param [String] order_by
386
+ # Expression that defines what fields and order to use for sorting. The string
387
+ # value should follow SQL syntax: comma separated list of fields. For example: "
388
+ # name,resource_properties.a_property". The default sorting order is ascending.
389
+ # To specify descending order for a field, a suffix " desc" should be appended
390
+ # to the field name. For example: "name desc,source_properties.a_property".
391
+ # Redundant space characters in the syntax are insignificant. "name desc,
392
+ # source_properties.a_property" and " name desc , source_properties.a_property "
393
+ # are equivalent. The following fields are supported: name parent state category
394
+ # resource_name event_time source_properties security_marks.marks
395
+ # @param [Fixnum] page_size
396
+ # The maximum number of results to return in a single response. Default is 10,
397
+ # minimum is 1, maximum is 1000.
398
+ # @param [String] page_token
399
+ # The value returned by the last `ListFindingsResponse`; indicates that this is
400
+ # a continuation of a prior `ListFindings` call, and that the system should
401
+ # return the next page of data.
402
+ # @param [String] read_time
403
+ # Time used as a reference point when filtering findings. The filter is limited
404
+ # to findings existing at the supplied time and their values are those at that
405
+ # specific time. Absence of this field will default to the API's version of NOW.
427
406
  # @param [String] fields
428
407
  # Selector specifying which fields to include in a partial response.
429
408
  # @param [String] quota_user
@@ -433,74 +412,44 @@ module Google
433
412
  # Request-specific options
434
413
  #
435
414
  # @yield [result, err] Result & error if block supplied
436
- # @yieldparam result [Google::Apis::SecuritycenterV1::NotificationConfig] parsed result object
415
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListFindingsResponse] parsed result object
437
416
  # @yieldparam err [StandardError] error object if request failed
438
417
  #
439
- # @return [Google::Apis::SecuritycenterV1::NotificationConfig]
418
+ # @return [Google::Apis::SecuritycenterV1::ListFindingsResponse]
440
419
  #
441
420
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
442
421
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
443
422
  # @raise [Google::Apis::AuthorizationError] Authorization is required
444
- def get_organization_notification_config(name, fields: nil, quota_user: nil, options: nil, &block)
445
- command = make_simple_command(:get, 'v1/{+name}', options)
446
- command.response_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
447
- command.response_class = Google::Apis::SecuritycenterV1::NotificationConfig
448
- command.params['name'] = name unless name.nil?
449
- command.query['fields'] = fields unless fields.nil?
450
- command.query['quotaUser'] = quota_user unless quota_user.nil?
451
- execute_or_queue_command(command, &block)
452
- end
453
-
454
- # Lists notification configs.
455
- # @param [String] parent
456
- # Required. Name of the organization to list notification configs. Its format is
457
- # "organizations/[organization_id]".
458
- # @param [Fixnum] page_size
459
- # The maximum number of results to return in a single response. Default is 10,
460
- # minimum is 1, maximum is 1000.
461
- # @param [String] page_token
462
- # The value returned by the last `ListNotificationConfigsResponse`; indicates
463
- # that this is a continuation of a prior `ListNotificationConfigs` call, and
464
- # that the system should return the next page of data.
465
- # @param [String] fields
466
- # Selector specifying which fields to include in a partial response.
467
- # @param [String] quota_user
468
- # Available to use for quota purposes for server-side applications. Can be any
469
- # arbitrary string assigned to a user, but should not exceed 40 characters.
470
- # @param [Google::Apis::RequestOptions] options
471
- # Request-specific options
472
- #
473
- # @yield [result, err] Result & error if block supplied
474
- # @yieldparam result [Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse] parsed result object
475
- # @yieldparam err [StandardError] error object if request failed
476
- #
477
- # @return [Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse]
478
- #
479
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
- # @raise [Google::Apis::AuthorizationError] Authorization is required
482
- def list_organization_notification_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
483
- command = make_simple_command(:get, 'v1/{+parent}/notificationConfigs', options)
484
- command.response_representation = Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse::Representation
485
- command.response_class = Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse
423
+ def list_folder_source_findings(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
424
+ command = make_simple_command(:get, 'v1/{+parent}/findings', options)
425
+ command.response_representation = Google::Apis::SecuritycenterV1::ListFindingsResponse::Representation
426
+ command.response_class = Google::Apis::SecuritycenterV1::ListFindingsResponse
486
427
  command.params['parent'] = parent unless parent.nil?
428
+ command.query['compareDuration'] = compare_duration unless compare_duration.nil?
429
+ command.query['fieldMask'] = field_mask unless field_mask.nil?
430
+ command.query['filter'] = filter unless filter.nil?
431
+ command.query['orderBy'] = order_by unless order_by.nil?
487
432
  command.query['pageSize'] = page_size unless page_size.nil?
488
433
  command.query['pageToken'] = page_token unless page_token.nil?
434
+ command.query['readTime'] = read_time unless read_time.nil?
489
435
  command.query['fields'] = fields unless fields.nil?
490
436
  command.query['quotaUser'] = quota_user unless quota_user.nil?
491
437
  execute_or_queue_command(command, &block)
492
438
  end
493
439
 
494
- # Updates a notification config. The following update fields are allowed:
495
- # description, pubsub_topic, streaming_config.filter
440
+ # Creates or updates a finding. The corresponding source must exist for a
441
+ # finding creation to succeed.
496
442
  # @param [String] name
497
- # The relative resource name of this notification config. See: https://cloud.
498
- # google.com/apis/design/resource_names#relative_resource_name Example: "
499
- # organizations/`organization_id`/notificationConfigs/notify_public_bucket".
500
- # @param [Google::Apis::SecuritycenterV1::NotificationConfig] notification_config_object
443
+ # The relative resource name of this finding. See: https://cloud.google.com/apis/
444
+ # design/resource_names#relative_resource_name Example: "organizations/`
445
+ # organization_id`/sources/`source_id`/findings/`finding_id`"
446
+ # @param [Google::Apis::SecuritycenterV1::Finding] finding_object
501
447
  # @param [String] update_mask
502
- # The FieldMask to use when updating the notification config. If empty all
503
- # mutable fields will be updated.
448
+ # The FieldMask to use when updating the finding resource. This field should not
449
+ # be specified when creating a finding. When updating a finding, an empty mask
450
+ # is treated as updating all mutable fields and replacing source_properties.
451
+ # Individual source_properties can be added/updated by using "source_properties."
452
+ # in the field mask.
504
453
  # @param [String] fields
505
454
  # Selector specifying which fields to include in a partial response.
506
455
  # @param [String] quota_user
@@ -510,20 +459,20 @@ module Google
510
459
  # Request-specific options
511
460
  #
512
461
  # @yield [result, err] Result & error if block supplied
513
- # @yieldparam result [Google::Apis::SecuritycenterV1::NotificationConfig] parsed result object
462
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Finding] parsed result object
514
463
  # @yieldparam err [StandardError] error object if request failed
515
464
  #
516
- # @return [Google::Apis::SecuritycenterV1::NotificationConfig]
465
+ # @return [Google::Apis::SecuritycenterV1::Finding]
517
466
  #
518
467
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
519
468
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
520
469
  # @raise [Google::Apis::AuthorizationError] Authorization is required
521
- def patch_organization_notification_config(name, notification_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
470
+ def patch_folder_source_finding(name, finding_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
522
471
  command = make_simple_command(:patch, 'v1/{+name}', options)
523
- command.request_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
524
- command.request_object = notification_config_object
525
- command.response_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
526
- command.response_class = Google::Apis::SecuritycenterV1::NotificationConfig
472
+ command.request_representation = Google::Apis::SecuritycenterV1::Finding::Representation
473
+ command.request_object = finding_object
474
+ command.response_representation = Google::Apis::SecuritycenterV1::Finding::Representation
475
+ command.response_class = Google::Apis::SecuritycenterV1::Finding
527
476
  command.params['name'] = name unless name.nil?
528
477
  command.query['updateMask'] = update_mask unless update_mask.nil?
529
478
  command.query['fields'] = fields unless fields.nil?
@@ -531,16 +480,12 @@ module Google
531
480
  execute_or_queue_command(command, &block)
532
481
  end
533
482
 
534
- # Starts asynchronous cancellation on a long-running operation. The server makes
535
- # a best effort to cancel the operation, but success is not guaranteed. If the
536
- # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
537
- # Clients can use Operations.GetOperation or other methods to check whether the
538
- # cancellation succeeded or whether the operation completed despite cancellation.
539
- # On successful cancellation, the operation is not deleted; instead, it becomes
540
- # an operation with an Operation.error value with a google.rpc.Status.code of 1,
541
- # corresponding to `Code.CANCELLED`.
483
+ # Updates the state of a finding.
542
484
  # @param [String] name
543
- # The name of the operation resource to be cancelled.
485
+ # Required. The relative resource name of the finding. See: https://cloud.google.
486
+ # com/apis/design/resource_names#relative_resource_name Example: "organizations/`
487
+ # organization_id`/sources/`source_id`/finding/`finding_id`".
488
+ # @param [Google::Apis::SecuritycenterV1::SetFindingStateRequest] set_finding_state_request_object
544
489
  # @param [String] fields
545
490
  # Selector specifying which fields to include in a partial response.
546
491
  # @param [String] quota_user
@@ -550,30 +495,41 @@ module Google
550
495
  # Request-specific options
551
496
  #
552
497
  # @yield [result, err] Result & error if block supplied
553
- # @yieldparam result [Google::Apis::SecuritycenterV1::Empty] parsed result object
498
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Finding] parsed result object
554
499
  # @yieldparam err [StandardError] error object if request failed
555
500
  #
556
- # @return [Google::Apis::SecuritycenterV1::Empty]
501
+ # @return [Google::Apis::SecuritycenterV1::Finding]
557
502
  #
558
503
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
559
504
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
560
505
  # @raise [Google::Apis::AuthorizationError] Authorization is required
561
- def cancel_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
562
- command = make_simple_command(:post, 'v1/{+name}:cancel', options)
563
- command.response_representation = Google::Apis::SecuritycenterV1::Empty::Representation
564
- command.response_class = Google::Apis::SecuritycenterV1::Empty
506
+ def set_folder_source_finding_state(name, set_finding_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
507
+ command = make_simple_command(:post, 'v1/{+name}:setState', options)
508
+ command.request_representation = Google::Apis::SecuritycenterV1::SetFindingStateRequest::Representation
509
+ command.request_object = set_finding_state_request_object
510
+ command.response_representation = Google::Apis::SecuritycenterV1::Finding::Representation
511
+ command.response_class = Google::Apis::SecuritycenterV1::Finding
565
512
  command.params['name'] = name unless name.nil?
566
513
  command.query['fields'] = fields unless fields.nil?
567
514
  command.query['quotaUser'] = quota_user unless quota_user.nil?
568
515
  execute_or_queue_command(command, &block)
569
516
  end
570
517
 
571
- # Deletes a long-running operation. This method indicates that the client is no
572
- # longer interested in the operation result. It does not cancel the operation.
573
- # If the server doesn't support this method, it returns `google.rpc.Code.
574
- # UNIMPLEMENTED`.
518
+ # Updates security marks.
575
519
  # @param [String] name
576
- # The name of the operation resource to be deleted.
520
+ # The relative resource name of the SecurityMarks. See: https://cloud.google.com/
521
+ # apis/design/resource_names#relative_resource_name Examples: "organizations/`
522
+ # organization_id`/assets/`asset_id`/securityMarks" "organizations/`
523
+ # organization_id`/sources/`source_id`/findings/`finding_id`/securityMarks".
524
+ # @param [Google::Apis::SecuritycenterV1::SecurityMarks] security_marks_object
525
+ # @param [String] start_time
526
+ # The time at which the updated SecurityMarks take effect. If not set uses
527
+ # current server time. Updates will be applied to the SecurityMarks that are
528
+ # active immediately preceding this time.
529
+ # @param [String] update_mask
530
+ # The FieldMask to use when updating the security marks resource. The field mask
531
+ # must not contain duplicate fields. If empty or set to "marks", all marks will
532
+ # be replaced. Individual marks can be updated using "marks.".
577
533
  # @param [String] fields
578
534
  # Selector specifying which fields to include in a partial response.
579
535
  # @param [String] quota_user
@@ -583,28 +539,32 @@ module Google
583
539
  # Request-specific options
584
540
  #
585
541
  # @yield [result, err] Result & error if block supplied
586
- # @yieldparam result [Google::Apis::SecuritycenterV1::Empty] parsed result object
542
+ # @yieldparam result [Google::Apis::SecuritycenterV1::SecurityMarks] parsed result object
587
543
  # @yieldparam err [StandardError] error object if request failed
588
544
  #
589
- # @return [Google::Apis::SecuritycenterV1::Empty]
545
+ # @return [Google::Apis::SecuritycenterV1::SecurityMarks]
590
546
  #
591
547
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
592
548
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
593
549
  # @raise [Google::Apis::AuthorizationError] Authorization is required
594
- def delete_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
595
- command = make_simple_command(:delete, 'v1/{+name}', options)
596
- command.response_representation = Google::Apis::SecuritycenterV1::Empty::Representation
597
- command.response_class = Google::Apis::SecuritycenterV1::Empty
550
+ def update_folder_source_finding_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
551
+ command = make_simple_command(:patch, 'v1/{+name}', options)
552
+ command.request_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
553
+ command.request_object = security_marks_object
554
+ command.response_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
555
+ command.response_class = Google::Apis::SecuritycenterV1::SecurityMarks
598
556
  command.params['name'] = name unless name.nil?
557
+ command.query['startTime'] = start_time unless start_time.nil?
558
+ command.query['updateMask'] = update_mask unless update_mask.nil?
599
559
  command.query['fields'] = fields unless fields.nil?
600
560
  command.query['quotaUser'] = quota_user unless quota_user.nil?
601
561
  execute_or_queue_command(command, &block)
602
562
  end
603
563
 
604
- # Gets the latest state of a long-running operation. Clients can use this method
605
- # to poll the operation result at intervals as recommended by the API service.
564
+ # Gets the settings for an organization.
606
565
  # @param [String] name
607
- # The name of the operation resource.
566
+ # Required. Name of the organization to get organization settings for. Its
567
+ # format is "organizations/[organization_id]/organizationSettings".
608
568
  # @param [String] fields
609
569
  # Selector specifying which fields to include in a partial response.
610
570
  # @param [String] quota_user
@@ -614,40 +574,33 @@ module Google
614
574
  # Request-specific options
615
575
  #
616
576
  # @yield [result, err] Result & error if block supplied
617
- # @yieldparam result [Google::Apis::SecuritycenterV1::Operation] parsed result object
577
+ # @yieldparam result [Google::Apis::SecuritycenterV1::OrganizationSettings] parsed result object
618
578
  # @yieldparam err [StandardError] error object if request failed
619
579
  #
620
- # @return [Google::Apis::SecuritycenterV1::Operation]
580
+ # @return [Google::Apis::SecuritycenterV1::OrganizationSettings]
621
581
  #
622
582
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
623
583
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
624
584
  # @raise [Google::Apis::AuthorizationError] Authorization is required
625
- def get_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
585
+ def get_organization_organization_settings(name, fields: nil, quota_user: nil, options: nil, &block)
626
586
  command = make_simple_command(:get, 'v1/{+name}', options)
627
- command.response_representation = Google::Apis::SecuritycenterV1::Operation::Representation
628
- command.response_class = Google::Apis::SecuritycenterV1::Operation
587
+ command.response_representation = Google::Apis::SecuritycenterV1::OrganizationSettings::Representation
588
+ command.response_class = Google::Apis::SecuritycenterV1::OrganizationSettings
629
589
  command.params['name'] = name unless name.nil?
630
590
  command.query['fields'] = fields unless fields.nil?
631
591
  command.query['quotaUser'] = quota_user unless quota_user.nil?
632
592
  execute_or_queue_command(command, &block)
633
593
  end
634
594
 
635
- # Lists operations that match the specified filter in the request. If the server
636
- # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
637
- # binding allows API services to override the binding to use different resource
638
- # name schemes, such as `users/*/operations`. To override the binding, API
639
- # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
640
- # service configuration. For backwards compatibility, the default name includes
641
- # the operations collection id, however overriding users must ensure the name
642
- # binding is the parent resource, without the operations collection id.
595
+ # Updates an organization's settings.
643
596
  # @param [String] name
644
- # The name of the operation's parent resource.
645
- # @param [String] filter
646
- # The standard list filter.
647
- # @param [Fixnum] page_size
648
- # The standard list page size.
649
- # @param [String] page_token
650
- # The standard list page token.
597
+ # The relative resource name of the settings. See: https://cloud.google.com/apis/
598
+ # design/resource_names#relative_resource_name Example: "organizations/`
599
+ # organization_id`/organizationSettings".
600
+ # @param [Google::Apis::SecuritycenterV1::OrganizationSettings] organization_settings_object
601
+ # @param [String] update_mask
602
+ # The FieldMask to use when updating the settings resource. If empty all mutable
603
+ # fields will be updated.
651
604
  # @param [String] fields
652
605
  # Selector specifying which fields to include in a partial response.
653
606
  # @param [String] quota_user
@@ -657,32 +610,32 @@ module Google
657
610
  # Request-specific options
658
611
  #
659
612
  # @yield [result, err] Result & error if block supplied
660
- # @yieldparam result [Google::Apis::SecuritycenterV1::ListOperationsResponse] parsed result object
613
+ # @yieldparam result [Google::Apis::SecuritycenterV1::OrganizationSettings] parsed result object
661
614
  # @yieldparam err [StandardError] error object if request failed
662
615
  #
663
- # @return [Google::Apis::SecuritycenterV1::ListOperationsResponse]
616
+ # @return [Google::Apis::SecuritycenterV1::OrganizationSettings]
664
617
  #
665
618
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
666
619
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
667
620
  # @raise [Google::Apis::AuthorizationError] Authorization is required
668
- def list_organization_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
669
- command = make_simple_command(:get, 'v1/{+name}', options)
670
- command.response_representation = Google::Apis::SecuritycenterV1::ListOperationsResponse::Representation
671
- command.response_class = Google::Apis::SecuritycenterV1::ListOperationsResponse
621
+ def update_organization_organization_settings(name, organization_settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
622
+ command = make_simple_command(:patch, 'v1/{+name}', options)
623
+ command.request_representation = Google::Apis::SecuritycenterV1::OrganizationSettings::Representation
624
+ command.request_object = organization_settings_object
625
+ command.response_representation = Google::Apis::SecuritycenterV1::OrganizationSettings::Representation
626
+ command.response_class = Google::Apis::SecuritycenterV1::OrganizationSettings
672
627
  command.params['name'] = name unless name.nil?
673
- command.query['filter'] = filter unless filter.nil?
674
- command.query['pageSize'] = page_size unless page_size.nil?
675
- command.query['pageToken'] = page_token unless page_token.nil?
628
+ command.query['updateMask'] = update_mask unless update_mask.nil?
676
629
  command.query['fields'] = fields unless fields.nil?
677
630
  command.query['quotaUser'] = quota_user unless quota_user.nil?
678
631
  execute_or_queue_command(command, &block)
679
632
  end
680
633
 
681
- # Creates a source.
634
+ # Filters an organization's assets and groups them by their specified properties.
682
635
  # @param [String] parent
683
- # Required. Resource name of the new source's parent. Its format should be "
684
- # organizations/[organization_id]".
685
- # @param [Google::Apis::SecuritycenterV1::Source] source_object
636
+ # Required. Name of the organization to groupBy. Its format is "organizations/[
637
+ # organization_id], folders/[folder_id], or projects/[project_id]".
638
+ # @param [Google::Apis::SecuritycenterV1::GroupAssetsRequest] group_assets_request_object
686
639
  # @param [String] fields
687
640
  # Selector specifying which fields to include in a partial response.
688
641
  # @param [String] quota_user
@@ -692,102 +645,1084 @@ module Google
692
645
  # Request-specific options
693
646
  #
694
647
  # @yield [result, err] Result & error if block supplied
695
- # @yieldparam result [Google::Apis::SecuritycenterV1::Source] parsed result object
648
+ # @yieldparam result [Google::Apis::SecuritycenterV1::GroupAssetsResponse] parsed result object
696
649
  # @yieldparam err [StandardError] error object if request failed
697
650
  #
698
- # @return [Google::Apis::SecuritycenterV1::Source]
651
+ # @return [Google::Apis::SecuritycenterV1::GroupAssetsResponse]
699
652
  #
700
653
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
701
654
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
702
655
  # @raise [Google::Apis::AuthorizationError] Authorization is required
703
- def create_organization_source(parent, source_object = nil, fields: nil, quota_user: nil, options: nil, &block)
704
- command = make_simple_command(:post, 'v1/{+parent}/sources', options)
705
- command.request_representation = Google::Apis::SecuritycenterV1::Source::Representation
706
- command.request_object = source_object
707
- command.response_representation = Google::Apis::SecuritycenterV1::Source::Representation
708
- command.response_class = Google::Apis::SecuritycenterV1::Source
656
+ def group_assets(parent, group_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
657
+ command = make_simple_command(:post, 'v1/{+parent}/assets:group', options)
658
+ command.request_representation = Google::Apis::SecuritycenterV1::GroupAssetsRequest::Representation
659
+ command.request_object = group_assets_request_object
660
+ command.response_representation = Google::Apis::SecuritycenterV1::GroupAssetsResponse::Representation
661
+ command.response_class = Google::Apis::SecuritycenterV1::GroupAssetsResponse
709
662
  command.params['parent'] = parent unless parent.nil?
710
663
  command.query['fields'] = fields unless fields.nil?
711
664
  command.query['quotaUser'] = quota_user unless quota_user.nil?
712
665
  execute_or_queue_command(command, &block)
713
666
  end
714
667
 
715
- # Gets a source.
716
- # @param [String] name
717
- # Required. Relative resource name of the source. Its format is "organizations/[
718
- # organization_id]/source/[source_id]".
719
- # @param [String] fields
720
- # Selector specifying which fields to include in a partial response.
721
- # @param [String] quota_user
722
- # Available to use for quota purposes for server-side applications. Can be any
723
- # arbitrary string assigned to a user, but should not exceed 40 characters.
724
- # @param [Google::Apis::RequestOptions] options
725
- # Request-specific options
726
- #
727
- # @yield [result, err] Result & error if block supplied
728
- # @yieldparam result [Google::Apis::SecuritycenterV1::Source] parsed result object
729
- # @yieldparam err [StandardError] error object if request failed
730
- #
731
- # @return [Google::Apis::SecuritycenterV1::Source]
732
- #
733
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
734
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
735
- # @raise [Google::Apis::AuthorizationError] Authorization is required
736
- def get_organization_source(name, fields: nil, quota_user: nil, options: nil, &block)
737
- command = make_simple_command(:get, 'v1/{+name}', options)
738
- command.response_representation = Google::Apis::SecuritycenterV1::Source::Representation
739
- command.response_class = Google::Apis::SecuritycenterV1::Source
740
- command.params['name'] = name unless name.nil?
741
- command.query['fields'] = fields unless fields.nil?
742
- command.query['quotaUser'] = quota_user unless quota_user.nil?
743
- execute_or_queue_command(command, &block)
744
- end
745
-
746
- # Gets the access control policy on the specified Source.
747
- # @param [String] resource
748
- # REQUIRED: The resource for which the policy is being requested. See the
749
- # operation documentation for the appropriate value for this field.
750
- # @param [Google::Apis::SecuritycenterV1::GetIamPolicyRequest] get_iam_policy_request_object
751
- # @param [String] fields
752
- # Selector specifying which fields to include in a partial response.
753
- # @param [String] quota_user
754
- # Available to use for quota purposes for server-side applications. Can be any
755
- # arbitrary string assigned to a user, but should not exceed 40 characters.
756
- # @param [Google::Apis::RequestOptions] options
668
+ # Lists an organization's assets.
669
+ # @param [String] parent
670
+ # Required. Name of the organization assets should belong to. Its format is "
671
+ # organizations/[organization_id], folders/[folder_id], or projects/[project_id]"
672
+ # .
673
+ # @param [String] compare_duration
674
+ # When compare_duration is set, the ListAssetsResult's "state_change" attribute
675
+ # is updated to indicate whether the asset was added, removed, or remained
676
+ # present during the compare_duration period of time that precedes the read_time.
677
+ # This is the time between (read_time - compare_duration) and read_time. The
678
+ # state_change value is derived based on the presence of the asset at the two
679
+ # points in time. Intermediate state changes between the two times don't affect
680
+ # the result. For example, the results aren't affected if the asset is removed
681
+ # and re-created again. Possible "state_change" values when compare_duration is
682
+ # specified: * "ADDED": indicates that the asset was not present at the start of
683
+ # compare_duration, but present at read_time. * "REMOVED": indicates that the
684
+ # asset was present at the start of compare_duration, but not present at
685
+ # read_time. * "ACTIVE": indicates that the asset was present at both the start
686
+ # and the end of the time period defined by compare_duration and read_time. If
687
+ # compare_duration is not specified, then the only possible state_change is "
688
+ # UNUSED", which will be the state_change set for all assets present at
689
+ # read_time.
690
+ # @param [String] field_mask
691
+ # A field mask to specify the ListAssetsResult fields to be listed in the
692
+ # response. An empty field mask will list all fields.
693
+ # @param [String] filter
694
+ # Expression that defines the filter to apply across assets. The expression is a
695
+ # list of zero or more restrictions combined via logical operators `AND` and `OR`
696
+ # . Parentheses are supported, and `OR` has higher precedence than `AND`.
697
+ # Restrictions have the form ` ` and may have a `-` character in front of them
698
+ # to indicate negation. The fields map to those defined in the Asset resource.
699
+ # Examples include: * name * security_center_properties.resource_name *
700
+ # resource_properties.a_property * security_marks.marks.marka The supported
701
+ # operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer
702
+ # values. * `:`, meaning substring matching, for strings. The supported value
703
+ # types are: * string literals in quotes. * integer literals without quotes. *
704
+ # boolean literals `true` and `false` without quotes. The following are the
705
+ # allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `
706
+ # <`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
707
+ # string. Examples: `update_time = "2019-06-10T16:07:18-07:00"` `update_time =
708
+ # 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be
709
+ # milliseconds since epoch or an RFC3339 string. Examples: `create_time = "2019-
710
+ # 06-10T16:07:18-07:00"` `create_time = 1560208038000` * iam_policy.policy_blob:
711
+ # `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` *
712
+ # security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`,
713
+ # `:` * security_center_properties.resource_display_name: `=`, `:` *
714
+ # security_center_properties.resource_type: `=`, `:` *
715
+ # security_center_properties.resource_parent: `=`, `:` *
716
+ # security_center_properties.resource_parent_display_name: `=`, `:` *
717
+ # security_center_properties.resource_project: `=`, `:` *
718
+ # security_center_properties.resource_project_display_name: `=`, `:` *
719
+ # security_center_properties.resource_owners: `=`, `:` For example, `
720
+ # resource_properties.size = 100` is a valid filter string. Use a partial match
721
+ # on the empty string to filter based on a property existing: `
722
+ # resource_properties.my_property : ""` Use a negated partial match on the empty
723
+ # string to filter based on a property not existing: `-resource_properties.
724
+ # my_property : ""`
725
+ # @param [String] order_by
726
+ # Expression that defines what fields and order to use for sorting. The string
727
+ # value should follow SQL syntax: comma separated list of fields. For example: "
728
+ # name,resource_properties.a_property". The default sorting order is ascending.
729
+ # To specify descending order for a field, a suffix " desc" should be appended
730
+ # to the field name. For example: "name desc,resource_properties.a_property".
731
+ # Redundant space characters in the syntax are insignificant. "name desc,
732
+ # resource_properties.a_property" and " name desc , resource_properties.
733
+ # a_property " are equivalent. The following fields are supported: name
734
+ # update_time resource_properties security_marks.marks
735
+ # security_center_properties.resource_name security_center_properties.
736
+ # resource_display_name security_center_properties.resource_parent
737
+ # security_center_properties.resource_parent_display_name
738
+ # security_center_properties.resource_project security_center_properties.
739
+ # resource_project_display_name security_center_properties.resource_type
740
+ # @param [Fixnum] page_size
741
+ # The maximum number of results to return in a single response. Default is 10,
742
+ # minimum is 1, maximum is 1000.
743
+ # @param [String] page_token
744
+ # The value returned by the last `ListAssetsResponse`; indicates that this is a
745
+ # continuation of a prior `ListAssets` call, and that the system should return
746
+ # the next page of data.
747
+ # @param [String] read_time
748
+ # Time used as a reference point when filtering assets. The filter is limited to
749
+ # assets existing at the supplied time and their values are those at that
750
+ # specific time. Absence of this field will default to the API's version of NOW.
751
+ # @param [String] fields
752
+ # Selector specifying which fields to include in a partial response.
753
+ # @param [String] quota_user
754
+ # Available to use for quota purposes for server-side applications. Can be any
755
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
756
+ # @param [Google::Apis::RequestOptions] options
757
+ # Request-specific options
758
+ #
759
+ # @yield [result, err] Result & error if block supplied
760
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListAssetsResponse] parsed result object
761
+ # @yieldparam err [StandardError] error object if request failed
762
+ #
763
+ # @return [Google::Apis::SecuritycenterV1::ListAssetsResponse]
764
+ #
765
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
766
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
767
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
768
+ def list_organization_assets(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
769
+ command = make_simple_command(:get, 'v1/{+parent}/assets', options)
770
+ command.response_representation = Google::Apis::SecuritycenterV1::ListAssetsResponse::Representation
771
+ command.response_class = Google::Apis::SecuritycenterV1::ListAssetsResponse
772
+ command.params['parent'] = parent unless parent.nil?
773
+ command.query['compareDuration'] = compare_duration unless compare_duration.nil?
774
+ command.query['fieldMask'] = field_mask unless field_mask.nil?
775
+ command.query['filter'] = filter unless filter.nil?
776
+ command.query['orderBy'] = order_by unless order_by.nil?
777
+ command.query['pageSize'] = page_size unless page_size.nil?
778
+ command.query['pageToken'] = page_token unless page_token.nil?
779
+ command.query['readTime'] = read_time unless read_time.nil?
780
+ command.query['fields'] = fields unless fields.nil?
781
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
782
+ execute_or_queue_command(command, &block)
783
+ end
784
+
785
+ # Runs asset discovery. The discovery is tracked with a long-running operation.
786
+ # This API can only be called with limited frequency for an organization. If it
787
+ # is called too frequently the caller will receive a TOO_MANY_REQUESTS error.
788
+ # @param [String] parent
789
+ # Required. Name of the organization to run asset discovery for. Its format is "
790
+ # organizations/[organization_id]".
791
+ # @param [Google::Apis::SecuritycenterV1::RunAssetDiscoveryRequest] run_asset_discovery_request_object
792
+ # @param [String] fields
793
+ # Selector specifying which fields to include in a partial response.
794
+ # @param [String] quota_user
795
+ # Available to use for quota purposes for server-side applications. Can be any
796
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
797
+ # @param [Google::Apis::RequestOptions] options
798
+ # Request-specific options
799
+ #
800
+ # @yield [result, err] Result & error if block supplied
801
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Operation] parsed result object
802
+ # @yieldparam err [StandardError] error object if request failed
803
+ #
804
+ # @return [Google::Apis::SecuritycenterV1::Operation]
805
+ #
806
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
807
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
808
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
809
+ def run_organization_asset_discovery(parent, run_asset_discovery_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
810
+ command = make_simple_command(:post, 'v1/{+parent}/assets:runDiscovery', options)
811
+ command.request_representation = Google::Apis::SecuritycenterV1::RunAssetDiscoveryRequest::Representation
812
+ command.request_object = run_asset_discovery_request_object
813
+ command.response_representation = Google::Apis::SecuritycenterV1::Operation::Representation
814
+ command.response_class = Google::Apis::SecuritycenterV1::Operation
815
+ command.params['parent'] = parent unless parent.nil?
816
+ command.query['fields'] = fields unless fields.nil?
817
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
818
+ execute_or_queue_command(command, &block)
819
+ end
820
+
821
+ # Updates security marks.
822
+ # @param [String] name
823
+ # The relative resource name of the SecurityMarks. See: https://cloud.google.com/
824
+ # apis/design/resource_names#relative_resource_name Examples: "organizations/`
825
+ # organization_id`/assets/`asset_id`/securityMarks" "organizations/`
826
+ # organization_id`/sources/`source_id`/findings/`finding_id`/securityMarks".
827
+ # @param [Google::Apis::SecuritycenterV1::SecurityMarks] security_marks_object
828
+ # @param [String] start_time
829
+ # The time at which the updated SecurityMarks take effect. If not set uses
830
+ # current server time. Updates will be applied to the SecurityMarks that are
831
+ # active immediately preceding this time.
832
+ # @param [String] update_mask
833
+ # The FieldMask to use when updating the security marks resource. The field mask
834
+ # must not contain duplicate fields. If empty or set to "marks", all marks will
835
+ # be replaced. Individual marks can be updated using "marks.".
836
+ # @param [String] fields
837
+ # Selector specifying which fields to include in a partial response.
838
+ # @param [String] quota_user
839
+ # Available to use for quota purposes for server-side applications. Can be any
840
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
841
+ # @param [Google::Apis::RequestOptions] options
842
+ # Request-specific options
843
+ #
844
+ # @yield [result, err] Result & error if block supplied
845
+ # @yieldparam result [Google::Apis::SecuritycenterV1::SecurityMarks] parsed result object
846
+ # @yieldparam err [StandardError] error object if request failed
847
+ #
848
+ # @return [Google::Apis::SecuritycenterV1::SecurityMarks]
849
+ #
850
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
851
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
852
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
853
+ def update_organization_asset_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
854
+ command = make_simple_command(:patch, 'v1/{+name}', options)
855
+ command.request_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
856
+ command.request_object = security_marks_object
857
+ command.response_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
858
+ command.response_class = Google::Apis::SecuritycenterV1::SecurityMarks
859
+ command.params['name'] = name unless name.nil?
860
+ command.query['startTime'] = start_time unless start_time.nil?
861
+ command.query['updateMask'] = update_mask unless update_mask.nil?
862
+ command.query['fields'] = fields unless fields.nil?
863
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
864
+ execute_or_queue_command(command, &block)
865
+ end
866
+
867
+ # Creates a notification config.
868
+ # @param [String] parent
869
+ # Required. Resource name of the new notification config's parent. Its format is
870
+ # "organizations/[organization_id]".
871
+ # @param [Google::Apis::SecuritycenterV1::NotificationConfig] notification_config_object
872
+ # @param [String] config_id
873
+ # Required. Unique identifier provided by the client within the parent scope. It
874
+ # must be between 1 and 128 characters, and contains alphanumeric characters,
875
+ # underscores or hyphens only.
876
+ # @param [String] fields
877
+ # Selector specifying which fields to include in a partial response.
878
+ # @param [String] quota_user
879
+ # Available to use for quota purposes for server-side applications. Can be any
880
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
881
+ # @param [Google::Apis::RequestOptions] options
882
+ # Request-specific options
883
+ #
884
+ # @yield [result, err] Result & error if block supplied
885
+ # @yieldparam result [Google::Apis::SecuritycenterV1::NotificationConfig] parsed result object
886
+ # @yieldparam err [StandardError] error object if request failed
887
+ #
888
+ # @return [Google::Apis::SecuritycenterV1::NotificationConfig]
889
+ #
890
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
891
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
892
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
893
+ def create_organization_notification_config(parent, notification_config_object = nil, config_id: nil, fields: nil, quota_user: nil, options: nil, &block)
894
+ command = make_simple_command(:post, 'v1/{+parent}/notificationConfigs', options)
895
+ command.request_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
896
+ command.request_object = notification_config_object
897
+ command.response_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
898
+ command.response_class = Google::Apis::SecuritycenterV1::NotificationConfig
899
+ command.params['parent'] = parent unless parent.nil?
900
+ command.query['configId'] = config_id unless config_id.nil?
901
+ command.query['fields'] = fields unless fields.nil?
902
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
903
+ execute_or_queue_command(command, &block)
904
+ end
905
+
906
+ # Deletes a notification config.
907
+ # @param [String] name
908
+ # Required. Name of the notification config to delete. Its format is "
909
+ # organizations/[organization_id]/notificationConfigs/[config_id]".
910
+ # @param [String] fields
911
+ # Selector specifying which fields to include in a partial response.
912
+ # @param [String] quota_user
913
+ # Available to use for quota purposes for server-side applications. Can be any
914
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
915
+ # @param [Google::Apis::RequestOptions] options
916
+ # Request-specific options
917
+ #
918
+ # @yield [result, err] Result & error if block supplied
919
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Empty] parsed result object
920
+ # @yieldparam err [StandardError] error object if request failed
921
+ #
922
+ # @return [Google::Apis::SecuritycenterV1::Empty]
923
+ #
924
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
925
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
926
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
927
+ def delete_organization_notification_config(name, fields: nil, quota_user: nil, options: nil, &block)
928
+ command = make_simple_command(:delete, 'v1/{+name}', options)
929
+ command.response_representation = Google::Apis::SecuritycenterV1::Empty::Representation
930
+ command.response_class = Google::Apis::SecuritycenterV1::Empty
931
+ command.params['name'] = name unless name.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
934
+ execute_or_queue_command(command, &block)
935
+ end
936
+
937
+ # Gets a notification config.
938
+ # @param [String] name
939
+ # Required. Name of the notification config to get. Its format is "organizations/
940
+ # [organization_id]/notificationConfigs/[config_id]".
941
+ # @param [String] fields
942
+ # Selector specifying which fields to include in a partial response.
943
+ # @param [String] quota_user
944
+ # Available to use for quota purposes for server-side applications. Can be any
945
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
946
+ # @param [Google::Apis::RequestOptions] options
947
+ # Request-specific options
948
+ #
949
+ # @yield [result, err] Result & error if block supplied
950
+ # @yieldparam result [Google::Apis::SecuritycenterV1::NotificationConfig] parsed result object
951
+ # @yieldparam err [StandardError] error object if request failed
952
+ #
953
+ # @return [Google::Apis::SecuritycenterV1::NotificationConfig]
954
+ #
955
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
956
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
957
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
958
+ def get_organization_notification_config(name, fields: nil, quota_user: nil, options: nil, &block)
959
+ command = make_simple_command(:get, 'v1/{+name}', options)
960
+ command.response_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
961
+ command.response_class = Google::Apis::SecuritycenterV1::NotificationConfig
962
+ command.params['name'] = name unless name.nil?
963
+ command.query['fields'] = fields unless fields.nil?
964
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
965
+ execute_or_queue_command(command, &block)
966
+ end
967
+
968
+ # Lists notification configs.
969
+ # @param [String] parent
970
+ # Required. Name of the organization to list notification configs. Its format is
971
+ # "organizations/[organization_id]".
972
+ # @param [Fixnum] page_size
973
+ # The maximum number of results to return in a single response. Default is 10,
974
+ # minimum is 1, maximum is 1000.
975
+ # @param [String] page_token
976
+ # The value returned by the last `ListNotificationConfigsResponse`; indicates
977
+ # that this is a continuation of a prior `ListNotificationConfigs` call, and
978
+ # that the system should return the next page of data.
979
+ # @param [String] fields
980
+ # Selector specifying which fields to include in a partial response.
981
+ # @param [String] quota_user
982
+ # Available to use for quota purposes for server-side applications. Can be any
983
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
984
+ # @param [Google::Apis::RequestOptions] options
985
+ # Request-specific options
986
+ #
987
+ # @yield [result, err] Result & error if block supplied
988
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse] parsed result object
989
+ # @yieldparam err [StandardError] error object if request failed
990
+ #
991
+ # @return [Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse]
992
+ #
993
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
994
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
995
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
996
+ def list_organization_notification_configs(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
997
+ command = make_simple_command(:get, 'v1/{+parent}/notificationConfigs', options)
998
+ command.response_representation = Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse::Representation
999
+ command.response_class = Google::Apis::SecuritycenterV1::ListNotificationConfigsResponse
1000
+ command.params['parent'] = parent unless parent.nil?
1001
+ command.query['pageSize'] = page_size unless page_size.nil?
1002
+ command.query['pageToken'] = page_token unless page_token.nil?
1003
+ command.query['fields'] = fields unless fields.nil?
1004
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1005
+ execute_or_queue_command(command, &block)
1006
+ end
1007
+
1008
+ # Updates a notification config. The following update fields are allowed:
1009
+ # description, pubsub_topic, streaming_config.filter
1010
+ # @param [String] name
1011
+ # The relative resource name of this notification config. See: https://cloud.
1012
+ # google.com/apis/design/resource_names#relative_resource_name Example: "
1013
+ # organizations/`organization_id`/notificationConfigs/notify_public_bucket".
1014
+ # @param [Google::Apis::SecuritycenterV1::NotificationConfig] notification_config_object
1015
+ # @param [String] update_mask
1016
+ # The FieldMask to use when updating the notification config. If empty all
1017
+ # mutable fields will be updated.
1018
+ # @param [String] fields
1019
+ # Selector specifying which fields to include in a partial response.
1020
+ # @param [String] quota_user
1021
+ # Available to use for quota purposes for server-side applications. Can be any
1022
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1023
+ # @param [Google::Apis::RequestOptions] options
1024
+ # Request-specific options
1025
+ #
1026
+ # @yield [result, err] Result & error if block supplied
1027
+ # @yieldparam result [Google::Apis::SecuritycenterV1::NotificationConfig] parsed result object
1028
+ # @yieldparam err [StandardError] error object if request failed
1029
+ #
1030
+ # @return [Google::Apis::SecuritycenterV1::NotificationConfig]
1031
+ #
1032
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1033
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1034
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1035
+ def patch_organization_notification_config(name, notification_config_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1036
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1037
+ command.request_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
1038
+ command.request_object = notification_config_object
1039
+ command.response_representation = Google::Apis::SecuritycenterV1::NotificationConfig::Representation
1040
+ command.response_class = Google::Apis::SecuritycenterV1::NotificationConfig
1041
+ command.params['name'] = name unless name.nil?
1042
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1043
+ command.query['fields'] = fields unless fields.nil?
1044
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1045
+ execute_or_queue_command(command, &block)
1046
+ end
1047
+
1048
+ # Starts asynchronous cancellation on a long-running operation. The server makes
1049
+ # a best effort to cancel the operation, but success is not guaranteed. If the
1050
+ # server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
1051
+ # Clients can use Operations.GetOperation or other methods to check whether the
1052
+ # cancellation succeeded or whether the operation completed despite cancellation.
1053
+ # On successful cancellation, the operation is not deleted; instead, it becomes
1054
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
1055
+ # corresponding to `Code.CANCELLED`.
1056
+ # @param [String] name
1057
+ # The name of the operation resource to be cancelled.
1058
+ # @param [String] fields
1059
+ # Selector specifying which fields to include in a partial response.
1060
+ # @param [String] quota_user
1061
+ # Available to use for quota purposes for server-side applications. Can be any
1062
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1063
+ # @param [Google::Apis::RequestOptions] options
1064
+ # Request-specific options
1065
+ #
1066
+ # @yield [result, err] Result & error if block supplied
1067
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Empty] parsed result object
1068
+ # @yieldparam err [StandardError] error object if request failed
1069
+ #
1070
+ # @return [Google::Apis::SecuritycenterV1::Empty]
1071
+ #
1072
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1073
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1074
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1075
+ def cancel_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1076
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
1077
+ command.response_representation = Google::Apis::SecuritycenterV1::Empty::Representation
1078
+ command.response_class = Google::Apis::SecuritycenterV1::Empty
1079
+ command.params['name'] = name unless name.nil?
1080
+ command.query['fields'] = fields unless fields.nil?
1081
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1082
+ execute_or_queue_command(command, &block)
1083
+ end
1084
+
1085
+ # Deletes a long-running operation. This method indicates that the client is no
1086
+ # longer interested in the operation result. It does not cancel the operation.
1087
+ # If the server doesn't support this method, it returns `google.rpc.Code.
1088
+ # UNIMPLEMENTED`.
1089
+ # @param [String] name
1090
+ # The name of the operation resource to be deleted.
1091
+ # @param [String] fields
1092
+ # Selector specifying which fields to include in a partial response.
1093
+ # @param [String] quota_user
1094
+ # Available to use for quota purposes for server-side applications. Can be any
1095
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1096
+ # @param [Google::Apis::RequestOptions] options
1097
+ # Request-specific options
1098
+ #
1099
+ # @yield [result, err] Result & error if block supplied
1100
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Empty] parsed result object
1101
+ # @yieldparam err [StandardError] error object if request failed
1102
+ #
1103
+ # @return [Google::Apis::SecuritycenterV1::Empty]
1104
+ #
1105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1108
+ def delete_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1109
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1110
+ command.response_representation = Google::Apis::SecuritycenterV1::Empty::Representation
1111
+ command.response_class = Google::Apis::SecuritycenterV1::Empty
1112
+ command.params['name'] = name unless name.nil?
1113
+ command.query['fields'] = fields unless fields.nil?
1114
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1115
+ execute_or_queue_command(command, &block)
1116
+ end
1117
+
1118
+ # Gets the latest state of a long-running operation. Clients can use this method
1119
+ # to poll the operation result at intervals as recommended by the API service.
1120
+ # @param [String] name
1121
+ # The name of the operation resource.
1122
+ # @param [String] fields
1123
+ # Selector specifying which fields to include in a partial response.
1124
+ # @param [String] quota_user
1125
+ # Available to use for quota purposes for server-side applications. Can be any
1126
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1127
+ # @param [Google::Apis::RequestOptions] options
1128
+ # Request-specific options
1129
+ #
1130
+ # @yield [result, err] Result & error if block supplied
1131
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Operation] parsed result object
1132
+ # @yieldparam err [StandardError] error object if request failed
1133
+ #
1134
+ # @return [Google::Apis::SecuritycenterV1::Operation]
1135
+ #
1136
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1137
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1138
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1139
+ def get_organization_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1140
+ command = make_simple_command(:get, 'v1/{+name}', options)
1141
+ command.response_representation = Google::Apis::SecuritycenterV1::Operation::Representation
1142
+ command.response_class = Google::Apis::SecuritycenterV1::Operation
1143
+ command.params['name'] = name unless name.nil?
1144
+ command.query['fields'] = fields unless fields.nil?
1145
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1146
+ execute_or_queue_command(command, &block)
1147
+ end
1148
+
1149
+ # Lists operations that match the specified filter in the request. If the server
1150
+ # doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name`
1151
+ # binding allows API services to override the binding to use different resource
1152
+ # name schemes, such as `users/*/operations`. To override the binding, API
1153
+ # services can add a binding such as `"/v1/`name=users/*`/operations"` to their
1154
+ # service configuration. For backwards compatibility, the default name includes
1155
+ # the operations collection id, however overriding users must ensure the name
1156
+ # binding is the parent resource, without the operations collection id.
1157
+ # @param [String] name
1158
+ # The name of the operation's parent resource.
1159
+ # @param [String] filter
1160
+ # The standard list filter.
1161
+ # @param [Fixnum] page_size
1162
+ # The standard list page size.
1163
+ # @param [String] page_token
1164
+ # The standard list page token.
1165
+ # @param [String] fields
1166
+ # Selector specifying which fields to include in a partial response.
1167
+ # @param [String] quota_user
1168
+ # Available to use for quota purposes for server-side applications. Can be any
1169
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1170
+ # @param [Google::Apis::RequestOptions] options
1171
+ # Request-specific options
1172
+ #
1173
+ # @yield [result, err] Result & error if block supplied
1174
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListOperationsResponse] parsed result object
1175
+ # @yieldparam err [StandardError] error object if request failed
1176
+ #
1177
+ # @return [Google::Apis::SecuritycenterV1::ListOperationsResponse]
1178
+ #
1179
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1180
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1181
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1182
+ def list_organization_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1183
+ command = make_simple_command(:get, 'v1/{+name}', options)
1184
+ command.response_representation = Google::Apis::SecuritycenterV1::ListOperationsResponse::Representation
1185
+ command.response_class = Google::Apis::SecuritycenterV1::ListOperationsResponse
1186
+ command.params['name'] = name unless name.nil?
1187
+ command.query['filter'] = filter unless filter.nil?
1188
+ command.query['pageSize'] = page_size unless page_size.nil?
1189
+ command.query['pageToken'] = page_token unless page_token.nil?
1190
+ command.query['fields'] = fields unless fields.nil?
1191
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1192
+ execute_or_queue_command(command, &block)
1193
+ end
1194
+
1195
+ # Creates a source.
1196
+ # @param [String] parent
1197
+ # Required. Resource name of the new source's parent. Its format should be "
1198
+ # organizations/[organization_id]".
1199
+ # @param [Google::Apis::SecuritycenterV1::Source] source_object
1200
+ # @param [String] fields
1201
+ # Selector specifying which fields to include in a partial response.
1202
+ # @param [String] quota_user
1203
+ # Available to use for quota purposes for server-side applications. Can be any
1204
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1205
+ # @param [Google::Apis::RequestOptions] options
1206
+ # Request-specific options
1207
+ #
1208
+ # @yield [result, err] Result & error if block supplied
1209
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Source] parsed result object
1210
+ # @yieldparam err [StandardError] error object if request failed
1211
+ #
1212
+ # @return [Google::Apis::SecuritycenterV1::Source]
1213
+ #
1214
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1215
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1216
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1217
+ def create_organization_source(parent, source_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1218
+ command = make_simple_command(:post, 'v1/{+parent}/sources', options)
1219
+ command.request_representation = Google::Apis::SecuritycenterV1::Source::Representation
1220
+ command.request_object = source_object
1221
+ command.response_representation = Google::Apis::SecuritycenterV1::Source::Representation
1222
+ command.response_class = Google::Apis::SecuritycenterV1::Source
1223
+ command.params['parent'] = parent unless parent.nil?
1224
+ command.query['fields'] = fields unless fields.nil?
1225
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1226
+ execute_or_queue_command(command, &block)
1227
+ end
1228
+
1229
+ # Gets a source.
1230
+ # @param [String] name
1231
+ # Required. Relative resource name of the source. Its format is "organizations/[
1232
+ # organization_id]/source/[source_id]".
1233
+ # @param [String] fields
1234
+ # Selector specifying which fields to include in a partial response.
1235
+ # @param [String] quota_user
1236
+ # Available to use for quota purposes for server-side applications. Can be any
1237
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1238
+ # @param [Google::Apis::RequestOptions] options
1239
+ # Request-specific options
1240
+ #
1241
+ # @yield [result, err] Result & error if block supplied
1242
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Source] parsed result object
1243
+ # @yieldparam err [StandardError] error object if request failed
1244
+ #
1245
+ # @return [Google::Apis::SecuritycenterV1::Source]
1246
+ #
1247
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1248
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1249
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1250
+ def get_organization_source(name, fields: nil, quota_user: nil, options: nil, &block)
1251
+ command = make_simple_command(:get, 'v1/{+name}', options)
1252
+ command.response_representation = Google::Apis::SecuritycenterV1::Source::Representation
1253
+ command.response_class = Google::Apis::SecuritycenterV1::Source
1254
+ command.params['name'] = name unless name.nil?
1255
+ command.query['fields'] = fields unless fields.nil?
1256
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1257
+ execute_or_queue_command(command, &block)
1258
+ end
1259
+
1260
+ # Gets the access control policy on the specified Source.
1261
+ # @param [String] resource
1262
+ # REQUIRED: The resource for which the policy is being requested. See the
1263
+ # operation documentation for the appropriate value for this field.
1264
+ # @param [Google::Apis::SecuritycenterV1::GetIamPolicyRequest] get_iam_policy_request_object
1265
+ # @param [String] fields
1266
+ # Selector specifying which fields to include in a partial response.
1267
+ # @param [String] quota_user
1268
+ # Available to use for quota purposes for server-side applications. Can be any
1269
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1270
+ # @param [Google::Apis::RequestOptions] options
1271
+ # Request-specific options
1272
+ #
1273
+ # @yield [result, err] Result & error if block supplied
1274
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Policy] parsed result object
1275
+ # @yieldparam err [StandardError] error object if request failed
1276
+ #
1277
+ # @return [Google::Apis::SecuritycenterV1::Policy]
1278
+ #
1279
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1280
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1281
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1282
+ def get_source_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1283
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
1284
+ command.request_representation = Google::Apis::SecuritycenterV1::GetIamPolicyRequest::Representation
1285
+ command.request_object = get_iam_policy_request_object
1286
+ command.response_representation = Google::Apis::SecuritycenterV1::Policy::Representation
1287
+ command.response_class = Google::Apis::SecuritycenterV1::Policy
1288
+ command.params['resource'] = resource unless resource.nil?
1289
+ command.query['fields'] = fields unless fields.nil?
1290
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1291
+ execute_or_queue_command(command, &block)
1292
+ end
1293
+
1294
+ # Lists all sources belonging to an organization.
1295
+ # @param [String] parent
1296
+ # Required. Resource name of the parent of sources to list. Its format should be
1297
+ # "organizations/[organization_id], folders/[folder_id], or projects/[project_id]
1298
+ # ".
1299
+ # @param [Fixnum] page_size
1300
+ # The maximum number of results to return in a single response. Default is 10,
1301
+ # minimum is 1, maximum is 1000.
1302
+ # @param [String] page_token
1303
+ # The value returned by the last `ListSourcesResponse`; indicates that this is a
1304
+ # continuation of a prior `ListSources` call, and that the system should return
1305
+ # the next page of data.
1306
+ # @param [String] fields
1307
+ # Selector specifying which fields to include in a partial response.
1308
+ # @param [String] quota_user
1309
+ # Available to use for quota purposes for server-side applications. Can be any
1310
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1311
+ # @param [Google::Apis::RequestOptions] options
1312
+ # Request-specific options
1313
+ #
1314
+ # @yield [result, err] Result & error if block supplied
1315
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListSourcesResponse] parsed result object
1316
+ # @yieldparam err [StandardError] error object if request failed
1317
+ #
1318
+ # @return [Google::Apis::SecuritycenterV1::ListSourcesResponse]
1319
+ #
1320
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1321
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1322
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1323
+ def list_organization_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1324
+ command = make_simple_command(:get, 'v1/{+parent}/sources', options)
1325
+ command.response_representation = Google::Apis::SecuritycenterV1::ListSourcesResponse::Representation
1326
+ command.response_class = Google::Apis::SecuritycenterV1::ListSourcesResponse
1327
+ command.params['parent'] = parent unless parent.nil?
1328
+ command.query['pageSize'] = page_size unless page_size.nil?
1329
+ command.query['pageToken'] = page_token unless page_token.nil?
1330
+ command.query['fields'] = fields unless fields.nil?
1331
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1332
+ execute_or_queue_command(command, &block)
1333
+ end
1334
+
1335
+ # Updates a source.
1336
+ # @param [String] name
1337
+ # The relative resource name of this source. See: https://cloud.google.com/apis/
1338
+ # design/resource_names#relative_resource_name Example: "organizations/`
1339
+ # organization_id`/sources/`source_id`"
1340
+ # @param [Google::Apis::SecuritycenterV1::Source] source_object
1341
+ # @param [String] update_mask
1342
+ # The FieldMask to use when updating the source resource. If empty all mutable
1343
+ # fields will be updated.
1344
+ # @param [String] fields
1345
+ # Selector specifying which fields to include in a partial response.
1346
+ # @param [String] quota_user
1347
+ # Available to use for quota purposes for server-side applications. Can be any
1348
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1349
+ # @param [Google::Apis::RequestOptions] options
1350
+ # Request-specific options
1351
+ #
1352
+ # @yield [result, err] Result & error if block supplied
1353
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Source] parsed result object
1354
+ # @yieldparam err [StandardError] error object if request failed
1355
+ #
1356
+ # @return [Google::Apis::SecuritycenterV1::Source]
1357
+ #
1358
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1359
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1360
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1361
+ def patch_organization_source(name, source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1362
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1363
+ command.request_representation = Google::Apis::SecuritycenterV1::Source::Representation
1364
+ command.request_object = source_object
1365
+ command.response_representation = Google::Apis::SecuritycenterV1::Source::Representation
1366
+ command.response_class = Google::Apis::SecuritycenterV1::Source
1367
+ command.params['name'] = name unless name.nil?
1368
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1369
+ command.query['fields'] = fields unless fields.nil?
1370
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1371
+ execute_or_queue_command(command, &block)
1372
+ end
1373
+
1374
+ # Sets the access control policy on the specified Source.
1375
+ # @param [String] resource
1376
+ # REQUIRED: The resource for which the policy is being specified. See the
1377
+ # operation documentation for the appropriate value for this field.
1378
+ # @param [Google::Apis::SecuritycenterV1::SetIamPolicyRequest] set_iam_policy_request_object
1379
+ # @param [String] fields
1380
+ # Selector specifying which fields to include in a partial response.
1381
+ # @param [String] quota_user
1382
+ # Available to use for quota purposes for server-side applications. Can be any
1383
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1384
+ # @param [Google::Apis::RequestOptions] options
1385
+ # Request-specific options
1386
+ #
1387
+ # @yield [result, err] Result & error if block supplied
1388
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Policy] parsed result object
1389
+ # @yieldparam err [StandardError] error object if request failed
1390
+ #
1391
+ # @return [Google::Apis::SecuritycenterV1::Policy]
1392
+ #
1393
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1394
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1395
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1396
+ def set_source_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1397
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1398
+ command.request_representation = Google::Apis::SecuritycenterV1::SetIamPolicyRequest::Representation
1399
+ command.request_object = set_iam_policy_request_object
1400
+ command.response_representation = Google::Apis::SecuritycenterV1::Policy::Representation
1401
+ command.response_class = Google::Apis::SecuritycenterV1::Policy
1402
+ command.params['resource'] = resource unless resource.nil?
1403
+ command.query['fields'] = fields unless fields.nil?
1404
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1405
+ execute_or_queue_command(command, &block)
1406
+ end
1407
+
1408
+ # Returns the permissions that a caller has on the specified source.
1409
+ # @param [String] resource
1410
+ # REQUIRED: The resource for which the policy detail is being requested. See the
1411
+ # operation documentation for the appropriate value for this field.
1412
+ # @param [Google::Apis::SecuritycenterV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1413
+ # @param [String] fields
1414
+ # Selector specifying which fields to include in a partial response.
1415
+ # @param [String] quota_user
1416
+ # Available to use for quota purposes for server-side applications. Can be any
1417
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1418
+ # @param [Google::Apis::RequestOptions] options
1419
+ # Request-specific options
1420
+ #
1421
+ # @yield [result, err] Result & error if block supplied
1422
+ # @yieldparam result [Google::Apis::SecuritycenterV1::TestIamPermissionsResponse] parsed result object
1423
+ # @yieldparam err [StandardError] error object if request failed
1424
+ #
1425
+ # @return [Google::Apis::SecuritycenterV1::TestIamPermissionsResponse]
1426
+ #
1427
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1428
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1429
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1430
+ def test_source_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1431
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
1432
+ command.request_representation = Google::Apis::SecuritycenterV1::TestIamPermissionsRequest::Representation
1433
+ command.request_object = test_iam_permissions_request_object
1434
+ command.response_representation = Google::Apis::SecuritycenterV1::TestIamPermissionsResponse::Representation
1435
+ command.response_class = Google::Apis::SecuritycenterV1::TestIamPermissionsResponse
1436
+ command.params['resource'] = resource unless resource.nil?
1437
+ command.query['fields'] = fields unless fields.nil?
1438
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1439
+ execute_or_queue_command(command, &block)
1440
+ end
1441
+
1442
+ # Creates a finding. The corresponding source must exist for finding creation to
1443
+ # succeed.
1444
+ # @param [String] parent
1445
+ # Required. Resource name of the new finding's parent. Its format should be "
1446
+ # organizations/[organization_id]/sources/[source_id]".
1447
+ # @param [Google::Apis::SecuritycenterV1::Finding] finding_object
1448
+ # @param [String] finding_id
1449
+ # Required. Unique identifier provided by the client within the parent scope. It
1450
+ # must be alphanumeric and less than or equal to 32 characters and greater than
1451
+ # 0 characters in length.
1452
+ # @param [String] fields
1453
+ # Selector specifying which fields to include in a partial response.
1454
+ # @param [String] quota_user
1455
+ # Available to use for quota purposes for server-side applications. Can be any
1456
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1457
+ # @param [Google::Apis::RequestOptions] options
757
1458
  # Request-specific options
758
1459
  #
759
1460
  # @yield [result, err] Result & error if block supplied
760
- # @yieldparam result [Google::Apis::SecuritycenterV1::Policy] parsed result object
1461
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Finding] parsed result object
761
1462
  # @yieldparam err [StandardError] error object if request failed
762
1463
  #
763
- # @return [Google::Apis::SecuritycenterV1::Policy]
1464
+ # @return [Google::Apis::SecuritycenterV1::Finding]
764
1465
  #
765
1466
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
766
1467
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
767
1468
  # @raise [Google::Apis::AuthorizationError] Authorization is required
768
- def get_source_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
769
- command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
770
- command.request_representation = Google::Apis::SecuritycenterV1::GetIamPolicyRequest::Representation
771
- command.request_object = get_iam_policy_request_object
772
- command.response_representation = Google::Apis::SecuritycenterV1::Policy::Representation
773
- command.response_class = Google::Apis::SecuritycenterV1::Policy
774
- command.params['resource'] = resource unless resource.nil?
1469
+ def create_organization_source_finding(parent, finding_object = nil, finding_id: nil, fields: nil, quota_user: nil, options: nil, &block)
1470
+ command = make_simple_command(:post, 'v1/{+parent}/findings', options)
1471
+ command.request_representation = Google::Apis::SecuritycenterV1::Finding::Representation
1472
+ command.request_object = finding_object
1473
+ command.response_representation = Google::Apis::SecuritycenterV1::Finding::Representation
1474
+ command.response_class = Google::Apis::SecuritycenterV1::Finding
1475
+ command.params['parent'] = parent unless parent.nil?
1476
+ command.query['findingId'] = finding_id unless finding_id.nil?
775
1477
  command.query['fields'] = fields unless fields.nil?
776
1478
  command.query['quotaUser'] = quota_user unless quota_user.nil?
777
1479
  execute_or_queue_command(command, &block)
778
1480
  end
779
1481
 
780
- # Lists all sources belonging to an organization.
1482
+ # Filters an organization or source's findings and groups them by their
1483
+ # specified properties. To group across all sources provide a `-` as the source
1484
+ # id. Example: /v1/organizations/`organization_id`/sources/-/findings, /v1/
1485
+ # folders/`folder_id`/sources/-/findings, /v1/projects/`project_id`/sources/-/
1486
+ # findings
781
1487
  # @param [String] parent
782
- # Required. Resource name of the parent of sources to list. Its format should be
783
- # "organizations/[organization_id]".
1488
+ # Required. Name of the source to groupBy. Its format is "organizations/[
1489
+ # organization_id]/sources/[source_id]", folders/[folder_id]/sources/[source_id],
1490
+ # or projects/[project_id]/sources/[source_id]. To groupBy across all sources
1491
+ # provide a source_id of `-`. For example: organizations/`organization_id`/
1492
+ # sources/-, folders/`folder_id`/sources/-, or projects/`project_id`/sources/-
1493
+ # @param [Google::Apis::SecuritycenterV1::GroupFindingsRequest] group_findings_request_object
1494
+ # @param [String] fields
1495
+ # Selector specifying which fields to include in a partial response.
1496
+ # @param [String] quota_user
1497
+ # Available to use for quota purposes for server-side applications. Can be any
1498
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1499
+ # @param [Google::Apis::RequestOptions] options
1500
+ # Request-specific options
1501
+ #
1502
+ # @yield [result, err] Result & error if block supplied
1503
+ # @yieldparam result [Google::Apis::SecuritycenterV1::GroupFindingsResponse] parsed result object
1504
+ # @yieldparam err [StandardError] error object if request failed
1505
+ #
1506
+ # @return [Google::Apis::SecuritycenterV1::GroupFindingsResponse]
1507
+ #
1508
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1509
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1510
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1511
+ def group_findings(parent, group_findings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1512
+ command = make_simple_command(:post, 'v1/{+parent}/findings:group', options)
1513
+ command.request_representation = Google::Apis::SecuritycenterV1::GroupFindingsRequest::Representation
1514
+ command.request_object = group_findings_request_object
1515
+ command.response_representation = Google::Apis::SecuritycenterV1::GroupFindingsResponse::Representation
1516
+ command.response_class = Google::Apis::SecuritycenterV1::GroupFindingsResponse
1517
+ command.params['parent'] = parent unless parent.nil?
1518
+ command.query['fields'] = fields unless fields.nil?
1519
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1520
+ execute_or_queue_command(command, &block)
1521
+ end
1522
+
1523
+ # Lists an organization or source's findings. To list across all sources provide
1524
+ # a `-` as the source id. Example: /v1/organizations/`organization_id`/sources/-/
1525
+ # findings
1526
+ # @param [String] parent
1527
+ # Required. Name of the source the findings belong to. Its format is "
1528
+ # organizations/[organization_id]/sources/[source_id], folders/[folder_id]/
1529
+ # sources/[source_id], or projects/[project_id]/sources/[source_id]". To list
1530
+ # across all sources provide a source_id of `-`. For example: organizations/`
1531
+ # organization_id`/sources/-, folders/`folder_id`/sources/- or projects/`
1532
+ # projects_id`/sources/-
1533
+ # @param [String] compare_duration
1534
+ # When compare_duration is set, the ListFindingsResult's "state_change"
1535
+ # attribute is updated to indicate whether the finding had its state changed,
1536
+ # the finding's state remained unchanged, or if the finding was added in any
1537
+ # state during the compare_duration period of time that precedes the read_time.
1538
+ # This is the time between (read_time - compare_duration) and read_time. The
1539
+ # state_change value is derived based on the presence and state of the finding
1540
+ # at the two points in time. Intermediate state changes between the two times
1541
+ # don't affect the result. For example, the results aren't affected if the
1542
+ # finding is made inactive and then active again. Possible "state_change" values
1543
+ # when compare_duration is specified: * "CHANGED": indicates that the finding
1544
+ # was present and matched the given filter at the start of compare_duration, but
1545
+ # changed its state at read_time. * "UNCHANGED": indicates that the finding was
1546
+ # present and matched the given filter at the start of compare_duration and did
1547
+ # not change state at read_time. * "ADDED": indicates that the finding did not
1548
+ # match the given filter or was not present at the start of compare_duration,
1549
+ # but was present at read_time. * "REMOVED": indicates that the finding was
1550
+ # present and matched the filter at the start of compare_duration, but did not
1551
+ # match the filter at read_time. If compare_duration is not specified, then the
1552
+ # only possible state_change is "UNUSED", which will be the state_change set for
1553
+ # all findings present at read_time.
1554
+ # @param [String] field_mask
1555
+ # A field mask to specify the Finding fields to be listed in the response. An
1556
+ # empty field mask will list all fields.
1557
+ # @param [String] filter
1558
+ # Expression that defines the filter to apply across findings. The expression is
1559
+ # a list of one or more restrictions combined via logical operators `AND` and `
1560
+ # OR`. Parentheses are supported, and `OR` has higher precedence than `AND`.
1561
+ # Restrictions have the form ` ` and may have a `-` character in front of them
1562
+ # to indicate negation. Examples include: * name * source_properties.a_property *
1563
+ # security_marks.marks.marka The supported operators are: * `=` for all value
1564
+ # types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring
1565
+ # matching, for strings. The supported value types are: * string literals in
1566
+ # quotes. * integer literals without quotes. * boolean literals `true` and `
1567
+ # false` without quotes. The following field and operator combinations are
1568
+ # supported: name: `=` parent: `=`, `:` resource_name: `=`, `:` state: `=`, `:`
1569
+ # category: `=`, `:` external_uri: `=`, `:` event_time: `=`, `>`, `<`, `>=`, `<=`
1570
+ # Usage: This should be milliseconds since epoch or an RFC3339 string. Examples:
1571
+ # `event_time = "2019-06-10T16:07:18-07:00"` `event_time = 1560208038000`
1572
+ # security_marks.marks: `=`, `:` source_properties: `=`, `:`, `>`, `<`, `>=`, `<=
1573
+ # ` For example, `source_properties.size = 100` is a valid filter string. Use a
1574
+ # partial match on the empty string to filter based on a property existing: `
1575
+ # source_properties.my_property : ""` Use a negated partial match on the empty
1576
+ # string to filter based on a property not existing: `-source_properties.
1577
+ # my_property : ""`
1578
+ # @param [String] order_by
1579
+ # Expression that defines what fields and order to use for sorting. The string
1580
+ # value should follow SQL syntax: comma separated list of fields. For example: "
1581
+ # name,resource_properties.a_property". The default sorting order is ascending.
1582
+ # To specify descending order for a field, a suffix " desc" should be appended
1583
+ # to the field name. For example: "name desc,source_properties.a_property".
1584
+ # Redundant space characters in the syntax are insignificant. "name desc,
1585
+ # source_properties.a_property" and " name desc , source_properties.a_property "
1586
+ # are equivalent. The following fields are supported: name parent state category
1587
+ # resource_name event_time source_properties security_marks.marks
784
1588
  # @param [Fixnum] page_size
785
1589
  # The maximum number of results to return in a single response. Default is 10,
786
1590
  # minimum is 1, maximum is 1000.
787
1591
  # @param [String] page_token
788
- # The value returned by the last `ListSourcesResponse`; indicates that this is a
789
- # continuation of a prior `ListSources` call, and that the system should return
790
- # the next page of data.
1592
+ # The value returned by the last `ListFindingsResponse`; indicates that this is
1593
+ # a continuation of a prior `ListFindings` call, and that the system should
1594
+ # return the next page of data.
1595
+ # @param [String] read_time
1596
+ # Time used as a reference point when filtering findings. The filter is limited
1597
+ # to findings existing at the supplied time and their values are those at that
1598
+ # specific time. Absence of this field will default to the API's version of NOW.
1599
+ # @param [String] fields
1600
+ # Selector specifying which fields to include in a partial response.
1601
+ # @param [String] quota_user
1602
+ # Available to use for quota purposes for server-side applications. Can be any
1603
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1604
+ # @param [Google::Apis::RequestOptions] options
1605
+ # Request-specific options
1606
+ #
1607
+ # @yield [result, err] Result & error if block supplied
1608
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListFindingsResponse] parsed result object
1609
+ # @yieldparam err [StandardError] error object if request failed
1610
+ #
1611
+ # @return [Google::Apis::SecuritycenterV1::ListFindingsResponse]
1612
+ #
1613
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1614
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1615
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1616
+ def list_organization_source_findings(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
1617
+ command = make_simple_command(:get, 'v1/{+parent}/findings', options)
1618
+ command.response_representation = Google::Apis::SecuritycenterV1::ListFindingsResponse::Representation
1619
+ command.response_class = Google::Apis::SecuritycenterV1::ListFindingsResponse
1620
+ command.params['parent'] = parent unless parent.nil?
1621
+ command.query['compareDuration'] = compare_duration unless compare_duration.nil?
1622
+ command.query['fieldMask'] = field_mask unless field_mask.nil?
1623
+ command.query['filter'] = filter unless filter.nil?
1624
+ command.query['orderBy'] = order_by unless order_by.nil?
1625
+ command.query['pageSize'] = page_size unless page_size.nil?
1626
+ command.query['pageToken'] = page_token unless page_token.nil?
1627
+ command.query['readTime'] = read_time unless read_time.nil?
1628
+ command.query['fields'] = fields unless fields.nil?
1629
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1630
+ execute_or_queue_command(command, &block)
1631
+ end
1632
+
1633
+ # Creates or updates a finding. The corresponding source must exist for a
1634
+ # finding creation to succeed.
1635
+ # @param [String] name
1636
+ # The relative resource name of this finding. See: https://cloud.google.com/apis/
1637
+ # design/resource_names#relative_resource_name Example: "organizations/`
1638
+ # organization_id`/sources/`source_id`/findings/`finding_id`"
1639
+ # @param [Google::Apis::SecuritycenterV1::Finding] finding_object
1640
+ # @param [String] update_mask
1641
+ # The FieldMask to use when updating the finding resource. This field should not
1642
+ # be specified when creating a finding. When updating a finding, an empty mask
1643
+ # is treated as updating all mutable fields and replacing source_properties.
1644
+ # Individual source_properties can be added/updated by using "source_properties."
1645
+ # in the field mask.
1646
+ # @param [String] fields
1647
+ # Selector specifying which fields to include in a partial response.
1648
+ # @param [String] quota_user
1649
+ # Available to use for quota purposes for server-side applications. Can be any
1650
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1651
+ # @param [Google::Apis::RequestOptions] options
1652
+ # Request-specific options
1653
+ #
1654
+ # @yield [result, err] Result & error if block supplied
1655
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Finding] parsed result object
1656
+ # @yieldparam err [StandardError] error object if request failed
1657
+ #
1658
+ # @return [Google::Apis::SecuritycenterV1::Finding]
1659
+ #
1660
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1661
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1662
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1663
+ def patch_organization_source_finding(name, finding_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1664
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1665
+ command.request_representation = Google::Apis::SecuritycenterV1::Finding::Representation
1666
+ command.request_object = finding_object
1667
+ command.response_representation = Google::Apis::SecuritycenterV1::Finding::Representation
1668
+ command.response_class = Google::Apis::SecuritycenterV1::Finding
1669
+ command.params['name'] = name unless name.nil?
1670
+ command.query['updateMask'] = update_mask unless update_mask.nil?
1671
+ command.query['fields'] = fields unless fields.nil?
1672
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1673
+ execute_or_queue_command(command, &block)
1674
+ end
1675
+
1676
+ # Updates the state of a finding.
1677
+ # @param [String] name
1678
+ # Required. The relative resource name of the finding. See: https://cloud.google.
1679
+ # com/apis/design/resource_names#relative_resource_name Example: "organizations/`
1680
+ # organization_id`/sources/`source_id`/finding/`finding_id`".
1681
+ # @param [Google::Apis::SecuritycenterV1::SetFindingStateRequest] set_finding_state_request_object
1682
+ # @param [String] fields
1683
+ # Selector specifying which fields to include in a partial response.
1684
+ # @param [String] quota_user
1685
+ # Available to use for quota purposes for server-side applications. Can be any
1686
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1687
+ # @param [Google::Apis::RequestOptions] options
1688
+ # Request-specific options
1689
+ #
1690
+ # @yield [result, err] Result & error if block supplied
1691
+ # @yieldparam result [Google::Apis::SecuritycenterV1::Finding] parsed result object
1692
+ # @yieldparam err [StandardError] error object if request failed
1693
+ #
1694
+ # @return [Google::Apis::SecuritycenterV1::Finding]
1695
+ #
1696
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1697
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1698
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1699
+ def set_organization_source_finding_state(name, set_finding_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1700
+ command = make_simple_command(:post, 'v1/{+name}:setState', options)
1701
+ command.request_representation = Google::Apis::SecuritycenterV1::SetFindingStateRequest::Representation
1702
+ command.request_object = set_finding_state_request_object
1703
+ command.response_representation = Google::Apis::SecuritycenterV1::Finding::Representation
1704
+ command.response_class = Google::Apis::SecuritycenterV1::Finding
1705
+ command.params['name'] = name unless name.nil?
1706
+ command.query['fields'] = fields unless fields.nil?
1707
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1708
+ execute_or_queue_command(command, &block)
1709
+ end
1710
+
1711
+ # Updates security marks.
1712
+ # @param [String] name
1713
+ # The relative resource name of the SecurityMarks. See: https://cloud.google.com/
1714
+ # apis/design/resource_names#relative_resource_name Examples: "organizations/`
1715
+ # organization_id`/assets/`asset_id`/securityMarks" "organizations/`
1716
+ # organization_id`/sources/`source_id`/findings/`finding_id`/securityMarks".
1717
+ # @param [Google::Apis::SecuritycenterV1::SecurityMarks] security_marks_object
1718
+ # @param [String] start_time
1719
+ # The time at which the updated SecurityMarks take effect. If not set uses
1720
+ # current server time. Updates will be applied to the SecurityMarks that are
1721
+ # active immediately preceding this time.
1722
+ # @param [String] update_mask
1723
+ # The FieldMask to use when updating the security marks resource. The field mask
1724
+ # must not contain duplicate fields. If empty or set to "marks", all marks will
1725
+ # be replaced. Individual marks can be updated using "marks.".
791
1726
  # @param [String] fields
792
1727
  # Selector specifying which fields to include in a partial response.
793
1728
  # @param [String] quota_user
@@ -797,35 +1732,33 @@ module Google
797
1732
  # Request-specific options
798
1733
  #
799
1734
  # @yield [result, err] Result & error if block supplied
800
- # @yieldparam result [Google::Apis::SecuritycenterV1::ListSourcesResponse] parsed result object
1735
+ # @yieldparam result [Google::Apis::SecuritycenterV1::SecurityMarks] parsed result object
801
1736
  # @yieldparam err [StandardError] error object if request failed
802
1737
  #
803
- # @return [Google::Apis::SecuritycenterV1::ListSourcesResponse]
1738
+ # @return [Google::Apis::SecuritycenterV1::SecurityMarks]
804
1739
  #
805
1740
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
806
1741
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
807
1742
  # @raise [Google::Apis::AuthorizationError] Authorization is required
808
- def list_organization_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
809
- command = make_simple_command(:get, 'v1/{+parent}/sources', options)
810
- command.response_representation = Google::Apis::SecuritycenterV1::ListSourcesResponse::Representation
811
- command.response_class = Google::Apis::SecuritycenterV1::ListSourcesResponse
812
- command.params['parent'] = parent unless parent.nil?
813
- command.query['pageSize'] = page_size unless page_size.nil?
814
- command.query['pageToken'] = page_token unless page_token.nil?
1743
+ def update_organization_source_finding_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1744
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1745
+ command.request_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
1746
+ command.request_object = security_marks_object
1747
+ command.response_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
1748
+ command.response_class = Google::Apis::SecuritycenterV1::SecurityMarks
1749
+ command.params['name'] = name unless name.nil?
1750
+ command.query['startTime'] = start_time unless start_time.nil?
1751
+ command.query['updateMask'] = update_mask unless update_mask.nil?
815
1752
  command.query['fields'] = fields unless fields.nil?
816
1753
  command.query['quotaUser'] = quota_user unless quota_user.nil?
817
1754
  execute_or_queue_command(command, &block)
818
1755
  end
819
1756
 
820
- # Updates a source.
821
- # @param [String] name
822
- # The relative resource name of this source. See: https://cloud.google.com/apis/
823
- # design/resource_names#relative_resource_name Example: "organizations/`
824
- # organization_id`/sources/`source_id`"
825
- # @param [Google::Apis::SecuritycenterV1::Source] source_object
826
- # @param [String] update_mask
827
- # The FieldMask to use when updating the source resource. If empty all mutable
828
- # fields will be updated.
1757
+ # Filters an organization's assets and groups them by their specified properties.
1758
+ # @param [String] parent
1759
+ # Required. Name of the organization to groupBy. Its format is "organizations/[
1760
+ # organization_id], folders/[folder_id], or projects/[project_id]".
1761
+ # @param [Google::Apis::SecuritycenterV1::GroupAssetsRequest] group_assets_request_object
829
1762
  # @param [String] fields
830
1763
  # Selector specifying which fields to include in a partial response.
831
1764
  # @param [String] quota_user
@@ -835,32 +1768,109 @@ module Google
835
1768
  # Request-specific options
836
1769
  #
837
1770
  # @yield [result, err] Result & error if block supplied
838
- # @yieldparam result [Google::Apis::SecuritycenterV1::Source] parsed result object
1771
+ # @yieldparam result [Google::Apis::SecuritycenterV1::GroupAssetsResponse] parsed result object
839
1772
  # @yieldparam err [StandardError] error object if request failed
840
1773
  #
841
- # @return [Google::Apis::SecuritycenterV1::Source]
1774
+ # @return [Google::Apis::SecuritycenterV1::GroupAssetsResponse]
842
1775
  #
843
1776
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
844
1777
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
845
1778
  # @raise [Google::Apis::AuthorizationError] Authorization is required
846
- def patch_organization_source(name, source_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
847
- command = make_simple_command(:patch, 'v1/{+name}', options)
848
- command.request_representation = Google::Apis::SecuritycenterV1::Source::Representation
849
- command.request_object = source_object
850
- command.response_representation = Google::Apis::SecuritycenterV1::Source::Representation
851
- command.response_class = Google::Apis::SecuritycenterV1::Source
852
- command.params['name'] = name unless name.nil?
853
- command.query['updateMask'] = update_mask unless update_mask.nil?
1779
+ def group_project_asset(parent, group_assets_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1780
+ command = make_simple_command(:post, 'v1/{+parent}/assets:group', options)
1781
+ command.request_representation = Google::Apis::SecuritycenterV1::GroupAssetsRequest::Representation
1782
+ command.request_object = group_assets_request_object
1783
+ command.response_representation = Google::Apis::SecuritycenterV1::GroupAssetsResponse::Representation
1784
+ command.response_class = Google::Apis::SecuritycenterV1::GroupAssetsResponse
1785
+ command.params['parent'] = parent unless parent.nil?
854
1786
  command.query['fields'] = fields unless fields.nil?
855
1787
  command.query['quotaUser'] = quota_user unless quota_user.nil?
856
1788
  execute_or_queue_command(command, &block)
857
1789
  end
858
1790
 
859
- # Sets the access control policy on the specified Source.
860
- # @param [String] resource
861
- # REQUIRED: The resource for which the policy is being specified. See the
862
- # operation documentation for the appropriate value for this field.
863
- # @param [Google::Apis::SecuritycenterV1::SetIamPolicyRequest] set_iam_policy_request_object
1791
+ # Lists an organization's assets.
1792
+ # @param [String] parent
1793
+ # Required. Name of the organization assets should belong to. Its format is "
1794
+ # organizations/[organization_id], folders/[folder_id], or projects/[project_id]"
1795
+ # .
1796
+ # @param [String] compare_duration
1797
+ # When compare_duration is set, the ListAssetsResult's "state_change" attribute
1798
+ # is updated to indicate whether the asset was added, removed, or remained
1799
+ # present during the compare_duration period of time that precedes the read_time.
1800
+ # This is the time between (read_time - compare_duration) and read_time. The
1801
+ # state_change value is derived based on the presence of the asset at the two
1802
+ # points in time. Intermediate state changes between the two times don't affect
1803
+ # the result. For example, the results aren't affected if the asset is removed
1804
+ # and re-created again. Possible "state_change" values when compare_duration is
1805
+ # specified: * "ADDED": indicates that the asset was not present at the start of
1806
+ # compare_duration, but present at read_time. * "REMOVED": indicates that the
1807
+ # asset was present at the start of compare_duration, but not present at
1808
+ # read_time. * "ACTIVE": indicates that the asset was present at both the start
1809
+ # and the end of the time period defined by compare_duration and read_time. If
1810
+ # compare_duration is not specified, then the only possible state_change is "
1811
+ # UNUSED", which will be the state_change set for all assets present at
1812
+ # read_time.
1813
+ # @param [String] field_mask
1814
+ # A field mask to specify the ListAssetsResult fields to be listed in the
1815
+ # response. An empty field mask will list all fields.
1816
+ # @param [String] filter
1817
+ # Expression that defines the filter to apply across assets. The expression is a
1818
+ # list of zero or more restrictions combined via logical operators `AND` and `OR`
1819
+ # . Parentheses are supported, and `OR` has higher precedence than `AND`.
1820
+ # Restrictions have the form ` ` and may have a `-` character in front of them
1821
+ # to indicate negation. The fields map to those defined in the Asset resource.
1822
+ # Examples include: * name * security_center_properties.resource_name *
1823
+ # resource_properties.a_property * security_marks.marks.marka The supported
1824
+ # operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer
1825
+ # values. * `:`, meaning substring matching, for strings. The supported value
1826
+ # types are: * string literals in quotes. * integer literals without quotes. *
1827
+ # boolean literals `true` and `false` without quotes. The following are the
1828
+ # allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `
1829
+ # <`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339
1830
+ # string. Examples: `update_time = "2019-06-10T16:07:18-07:00"` `update_time =
1831
+ # 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be
1832
+ # milliseconds since epoch or an RFC3339 string. Examples: `create_time = "2019-
1833
+ # 06-10T16:07:18-07:00"` `create_time = 1560208038000` * iam_policy.policy_blob:
1834
+ # `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` *
1835
+ # security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`,
1836
+ # `:` * security_center_properties.resource_display_name: `=`, `:` *
1837
+ # security_center_properties.resource_type: `=`, `:` *
1838
+ # security_center_properties.resource_parent: `=`, `:` *
1839
+ # security_center_properties.resource_parent_display_name: `=`, `:` *
1840
+ # security_center_properties.resource_project: `=`, `:` *
1841
+ # security_center_properties.resource_project_display_name: `=`, `:` *
1842
+ # security_center_properties.resource_owners: `=`, `:` For example, `
1843
+ # resource_properties.size = 100` is a valid filter string. Use a partial match
1844
+ # on the empty string to filter based on a property existing: `
1845
+ # resource_properties.my_property : ""` Use a negated partial match on the empty
1846
+ # string to filter based on a property not existing: `-resource_properties.
1847
+ # my_property : ""`
1848
+ # @param [String] order_by
1849
+ # Expression that defines what fields and order to use for sorting. The string
1850
+ # value should follow SQL syntax: comma separated list of fields. For example: "
1851
+ # name,resource_properties.a_property". The default sorting order is ascending.
1852
+ # To specify descending order for a field, a suffix " desc" should be appended
1853
+ # to the field name. For example: "name desc,resource_properties.a_property".
1854
+ # Redundant space characters in the syntax are insignificant. "name desc,
1855
+ # resource_properties.a_property" and " name desc , resource_properties.
1856
+ # a_property " are equivalent. The following fields are supported: name
1857
+ # update_time resource_properties security_marks.marks
1858
+ # security_center_properties.resource_name security_center_properties.
1859
+ # resource_display_name security_center_properties.resource_parent
1860
+ # security_center_properties.resource_parent_display_name
1861
+ # security_center_properties.resource_project security_center_properties.
1862
+ # resource_project_display_name security_center_properties.resource_type
1863
+ # @param [Fixnum] page_size
1864
+ # The maximum number of results to return in a single response. Default is 10,
1865
+ # minimum is 1, maximum is 1000.
1866
+ # @param [String] page_token
1867
+ # The value returned by the last `ListAssetsResponse`; indicates that this is a
1868
+ # continuation of a prior `ListAssets` call, and that the system should return
1869
+ # the next page of data.
1870
+ # @param [String] read_time
1871
+ # Time used as a reference point when filtering assets. The filter is limited to
1872
+ # assets existing at the supplied time and their values are those at that
1873
+ # specific time. Absence of this field will default to the API's version of NOW.
864
1874
  # @param [String] fields
865
1875
  # Selector specifying which fields to include in a partial response.
866
1876
  # @param [String] quota_user
@@ -870,31 +1880,46 @@ module Google
870
1880
  # Request-specific options
871
1881
  #
872
1882
  # @yield [result, err] Result & error if block supplied
873
- # @yieldparam result [Google::Apis::SecuritycenterV1::Policy] parsed result object
1883
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListAssetsResponse] parsed result object
874
1884
  # @yieldparam err [StandardError] error object if request failed
875
1885
  #
876
- # @return [Google::Apis::SecuritycenterV1::Policy]
1886
+ # @return [Google::Apis::SecuritycenterV1::ListAssetsResponse]
877
1887
  #
878
1888
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
879
1889
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
880
1890
  # @raise [Google::Apis::AuthorizationError] Authorization is required
881
- def set_source_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
882
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
883
- command.request_representation = Google::Apis::SecuritycenterV1::SetIamPolicyRequest::Representation
884
- command.request_object = set_iam_policy_request_object
885
- command.response_representation = Google::Apis::SecuritycenterV1::Policy::Representation
886
- command.response_class = Google::Apis::SecuritycenterV1::Policy
887
- command.params['resource'] = resource unless resource.nil?
1891
+ def list_project_assets(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
1892
+ command = make_simple_command(:get, 'v1/{+parent}/assets', options)
1893
+ command.response_representation = Google::Apis::SecuritycenterV1::ListAssetsResponse::Representation
1894
+ command.response_class = Google::Apis::SecuritycenterV1::ListAssetsResponse
1895
+ command.params['parent'] = parent unless parent.nil?
1896
+ command.query['compareDuration'] = compare_duration unless compare_duration.nil?
1897
+ command.query['fieldMask'] = field_mask unless field_mask.nil?
1898
+ command.query['filter'] = filter unless filter.nil?
1899
+ command.query['orderBy'] = order_by unless order_by.nil?
1900
+ command.query['pageSize'] = page_size unless page_size.nil?
1901
+ command.query['pageToken'] = page_token unless page_token.nil?
1902
+ command.query['readTime'] = read_time unless read_time.nil?
888
1903
  command.query['fields'] = fields unless fields.nil?
889
1904
  command.query['quotaUser'] = quota_user unless quota_user.nil?
890
1905
  execute_or_queue_command(command, &block)
891
1906
  end
892
1907
 
893
- # Returns the permissions that a caller has on the specified source.
894
- # @param [String] resource
895
- # REQUIRED: The resource for which the policy detail is being requested. See the
896
- # operation documentation for the appropriate value for this field.
897
- # @param [Google::Apis::SecuritycenterV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1908
+ # Updates security marks.
1909
+ # @param [String] name
1910
+ # The relative resource name of the SecurityMarks. See: https://cloud.google.com/
1911
+ # apis/design/resource_names#relative_resource_name Examples: "organizations/`
1912
+ # organization_id`/assets/`asset_id`/securityMarks" "organizations/`
1913
+ # organization_id`/sources/`source_id`/findings/`finding_id`/securityMarks".
1914
+ # @param [Google::Apis::SecuritycenterV1::SecurityMarks] security_marks_object
1915
+ # @param [String] start_time
1916
+ # The time at which the updated SecurityMarks take effect. If not set uses
1917
+ # current server time. Updates will be applied to the SecurityMarks that are
1918
+ # active immediately preceding this time.
1919
+ # @param [String] update_mask
1920
+ # The FieldMask to use when updating the security marks resource. The field mask
1921
+ # must not contain duplicate fields. If empty or set to "marks", all marks will
1922
+ # be replaced. Individual marks can be updated using "marks.".
898
1923
  # @param [String] fields
899
1924
  # Selector specifying which fields to include in a partial response.
900
1925
  # @param [String] quota_user
@@ -904,36 +1929,40 @@ module Google
904
1929
  # Request-specific options
905
1930
  #
906
1931
  # @yield [result, err] Result & error if block supplied
907
- # @yieldparam result [Google::Apis::SecuritycenterV1::TestIamPermissionsResponse] parsed result object
1932
+ # @yieldparam result [Google::Apis::SecuritycenterV1::SecurityMarks] parsed result object
908
1933
  # @yieldparam err [StandardError] error object if request failed
909
1934
  #
910
- # @return [Google::Apis::SecuritycenterV1::TestIamPermissionsResponse]
1935
+ # @return [Google::Apis::SecuritycenterV1::SecurityMarks]
911
1936
  #
912
1937
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
913
1938
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
914
1939
  # @raise [Google::Apis::AuthorizationError] Authorization is required
915
- def test_source_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
916
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
917
- command.request_representation = Google::Apis::SecuritycenterV1::TestIamPermissionsRequest::Representation
918
- command.request_object = test_iam_permissions_request_object
919
- command.response_representation = Google::Apis::SecuritycenterV1::TestIamPermissionsResponse::Representation
920
- command.response_class = Google::Apis::SecuritycenterV1::TestIamPermissionsResponse
921
- command.params['resource'] = resource unless resource.nil?
1940
+ def update_project_asset_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1941
+ command = make_simple_command(:patch, 'v1/{+name}', options)
1942
+ command.request_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
1943
+ command.request_object = security_marks_object
1944
+ command.response_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
1945
+ command.response_class = Google::Apis::SecuritycenterV1::SecurityMarks
1946
+ command.params['name'] = name unless name.nil?
1947
+ command.query['startTime'] = start_time unless start_time.nil?
1948
+ command.query['updateMask'] = update_mask unless update_mask.nil?
922
1949
  command.query['fields'] = fields unless fields.nil?
923
1950
  command.query['quotaUser'] = quota_user unless quota_user.nil?
924
1951
  execute_or_queue_command(command, &block)
925
1952
  end
926
1953
 
927
- # Creates a finding. The corresponding source must exist for finding creation to
928
- # succeed.
1954
+ # Lists all sources belonging to an organization.
929
1955
  # @param [String] parent
930
- # Required. Resource name of the new finding's parent. Its format should be "
931
- # organizations/[organization_id]/sources/[source_id]".
932
- # @param [Google::Apis::SecuritycenterV1::Finding] finding_object
933
- # @param [String] finding_id
934
- # Required. Unique identifier provided by the client within the parent scope. It
935
- # must be alphanumeric and less than or equal to 32 characters and greater than
936
- # 0 characters in length.
1956
+ # Required. Resource name of the parent of sources to list. Its format should be
1957
+ # "organizations/[organization_id], folders/[folder_id], or projects/[project_id]
1958
+ # ".
1959
+ # @param [Fixnum] page_size
1960
+ # The maximum number of results to return in a single response. Default is 10,
1961
+ # minimum is 1, maximum is 1000.
1962
+ # @param [String] page_token
1963
+ # The value returned by the last `ListSourcesResponse`; indicates that this is a
1964
+ # continuation of a prior `ListSources` call, and that the system should return
1965
+ # the next page of data.
937
1966
  # @param [String] fields
938
1967
  # Selector specifying which fields to include in a partial response.
939
1968
  # @param [String] quota_user
@@ -943,22 +1972,21 @@ module Google
943
1972
  # Request-specific options
944
1973
  #
945
1974
  # @yield [result, err] Result & error if block supplied
946
- # @yieldparam result [Google::Apis::SecuritycenterV1::Finding] parsed result object
1975
+ # @yieldparam result [Google::Apis::SecuritycenterV1::ListSourcesResponse] parsed result object
947
1976
  # @yieldparam err [StandardError] error object if request failed
948
1977
  #
949
- # @return [Google::Apis::SecuritycenterV1::Finding]
1978
+ # @return [Google::Apis::SecuritycenterV1::ListSourcesResponse]
950
1979
  #
951
1980
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
952
1981
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
953
1982
  # @raise [Google::Apis::AuthorizationError] Authorization is required
954
- def create_organization_source_finding(parent, finding_object = nil, finding_id: nil, fields: nil, quota_user: nil, options: nil, &block)
955
- command = make_simple_command(:post, 'v1/{+parent}/findings', options)
956
- command.request_representation = Google::Apis::SecuritycenterV1::Finding::Representation
957
- command.request_object = finding_object
958
- command.response_representation = Google::Apis::SecuritycenterV1::Finding::Representation
959
- command.response_class = Google::Apis::SecuritycenterV1::Finding
1983
+ def list_project_sources(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1984
+ command = make_simple_command(:get, 'v1/{+parent}/sources', options)
1985
+ command.response_representation = Google::Apis::SecuritycenterV1::ListSourcesResponse::Representation
1986
+ command.response_class = Google::Apis::SecuritycenterV1::ListSourcesResponse
960
1987
  command.params['parent'] = parent unless parent.nil?
961
- command.query['findingId'] = finding_id unless finding_id.nil?
1988
+ command.query['pageSize'] = page_size unless page_size.nil?
1989
+ command.query['pageToken'] = page_token unless page_token.nil?
962
1990
  command.query['fields'] = fields unless fields.nil?
963
1991
  command.query['quotaUser'] = quota_user unless quota_user.nil?
964
1992
  execute_or_queue_command(command, &block)
@@ -966,11 +1994,15 @@ module Google
966
1994
 
967
1995
  # Filters an organization or source's findings and groups them by their
968
1996
  # specified properties. To group across all sources provide a `-` as the source
969
- # id. Example: /v1/organizations/`organization_id`/sources/-/findings
1997
+ # id. Example: /v1/organizations/`organization_id`/sources/-/findings, /v1/
1998
+ # folders/`folder_id`/sources/-/findings, /v1/projects/`project_id`/sources/-/
1999
+ # findings
970
2000
  # @param [String] parent
971
2001
  # Required. Name of the source to groupBy. Its format is "organizations/[
972
- # organization_id]/sources/[source_id]". To groupBy across all sources provide a
973
- # source_id of `-`. For example: organizations/`organization_id`/sources/-
2002
+ # organization_id]/sources/[source_id]", folders/[folder_id]/sources/[source_id],
2003
+ # or projects/[project_id]/sources/[source_id]. To groupBy across all sources
2004
+ # provide a source_id of `-`. For example: organizations/`organization_id`/
2005
+ # sources/-, folders/`folder_id`/sources/-, or projects/`project_id`/sources/-
974
2006
  # @param [Google::Apis::SecuritycenterV1::GroupFindingsRequest] group_findings_request_object
975
2007
  # @param [String] fields
976
2008
  # Selector specifying which fields to include in a partial response.
@@ -989,7 +2021,7 @@ module Google
989
2021
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
990
2022
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
991
2023
  # @raise [Google::Apis::AuthorizationError] Authorization is required
992
- def group_findings(parent, group_findings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2024
+ def group_project_source_finding(parent, group_findings_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
993
2025
  command = make_simple_command(:post, 'v1/{+parent}/findings:group', options)
994
2026
  command.request_representation = Google::Apis::SecuritycenterV1::GroupFindingsRequest::Representation
995
2027
  command.request_object = group_findings_request_object
@@ -1006,9 +2038,11 @@ module Google
1006
2038
  # findings
1007
2039
  # @param [String] parent
1008
2040
  # Required. Name of the source the findings belong to. Its format is "
1009
- # organizations/[organization_id]/sources/[source_id]". To list across all
1010
- # sources provide a source_id of `-`. For example: organizations/`
1011
- # organization_id`/sources/-
2041
+ # organizations/[organization_id]/sources/[source_id], folders/[folder_id]/
2042
+ # sources/[source_id], or projects/[project_id]/sources/[source_id]". To list
2043
+ # across all sources provide a source_id of `-`. For example: organizations/`
2044
+ # organization_id`/sources/-, folders/`folder_id`/sources/- or projects/`
2045
+ # projects_id`/sources/-
1012
2046
  # @param [String] compare_duration
1013
2047
  # When compare_duration is set, the ListFindingsResult's "state_change"
1014
2048
  # attribute is updated to indicate whether the finding had its state changed,
@@ -1092,7 +2126,7 @@ module Google
1092
2126
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1093
2127
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1094
2128
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1095
- def list_organization_source_findings(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
2129
+ def list_project_source_findings(parent, compare_duration: nil, field_mask: nil, filter: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, fields: nil, quota_user: nil, options: nil, &block)
1096
2130
  command = make_simple_command(:get, 'v1/{+parent}/findings', options)
1097
2131
  command.response_representation = Google::Apis::SecuritycenterV1::ListFindingsResponse::Representation
1098
2132
  command.response_class = Google::Apis::SecuritycenterV1::ListFindingsResponse
@@ -1139,7 +2173,7 @@ module Google
1139
2173
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1140
2174
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1141
2175
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1142
- def patch_organization_source_finding(name, finding_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2176
+ def patch_project_source_finding(name, finding_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1143
2177
  command = make_simple_command(:patch, 'v1/{+name}', options)
1144
2178
  command.request_representation = Google::Apis::SecuritycenterV1::Finding::Representation
1145
2179
  command.request_object = finding_object
@@ -1175,7 +2209,7 @@ module Google
1175
2209
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1176
2210
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1177
2211
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1178
- def set_organization_source_finding_state(name, set_finding_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2212
+ def set_project_source_finding_state(name, set_finding_state_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1179
2213
  command = make_simple_command(:post, 'v1/{+name}:setState', options)
1180
2214
  command.request_representation = Google::Apis::SecuritycenterV1::SetFindingStateRequest::Representation
1181
2215
  command.request_object = set_finding_state_request_object
@@ -1219,7 +2253,7 @@ module Google
1219
2253
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1220
2254
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1221
2255
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1222
- def update_organization_source_finding_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
2256
+ def update_project_source_finding_security_marks(name, security_marks_object = nil, start_time: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1223
2257
  command = make_simple_command(:patch, 'v1/{+name}', options)
1224
2258
  command.request_representation = Google::Apis::SecuritycenterV1::SecurityMarks::Representation
1225
2259
  command.request_object = security_marks_object