google-api-client 0.9.8 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -8
  3. data/CHANGELOG.md +84 -0
  4. data/Gemfile +10 -2
  5. data/README.md +10 -2
  6. data/api_names.yaml +37172 -135
  7. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
  8. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
  11. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  12. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
  13. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
  14. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
  15. data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
  16. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
  17. data/generated/google/apis/admin_directory_v1.rb +1 -1
  18. data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
  19. data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
  20. data/generated/google/apis/admin_directory_v1/service.rb +41 -2
  21. data/generated/google/apis/admin_reports_v1.rb +5 -5
  22. data/generated/google/apis/admin_reports_v1/service.rb +6 -6
  23. data/generated/google/apis/adsense_v1_4.rb +1 -1
  24. data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
  25. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  26. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
  27. data/generated/google/apis/analytics_v3.rb +1 -1
  28. data/generated/google/apis/analytics_v3/classes.rb +379 -3
  29. data/generated/google/apis/analytics_v3/representations.rb +136 -0
  30. data/generated/google/apis/analytics_v3/service.rb +256 -0
  31. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  32. data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
  33. data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
  34. data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
  35. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  36. data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
  37. data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
  38. data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
  39. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  40. data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
  41. data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
  42. data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
  43. data/generated/google/apis/appengine_v1beta5.rb +7 -1
  44. data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
  45. data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
  46. data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
  47. data/generated/google/apis/appsactivity_v1.rb +3 -3
  48. data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
  49. data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
  50. data/generated/google/apis/appsactivity_v1/service.rb +1 -1
  51. data/generated/google/apis/appstate_v1.rb +1 -1
  52. data/generated/google/apis/bigquery_v2.rb +1 -1
  53. data/generated/google/apis/bigquery_v2/classes.rb +360 -38
  54. data/generated/google/apis/bigquery_v2/representations.rb +106 -0
  55. data/generated/google/apis/bigquery_v2/service.rb +18 -4
  56. data/generated/google/apis/books_v1.rb +2 -2
  57. data/generated/google/apis/books_v1/classes.rb +83 -0
  58. data/generated/google/apis/books_v1/representations.rb +35 -0
  59. data/generated/google/apis/books_v1/service.rb +7 -3
  60. data/generated/google/apis/calendar_v3.rb +1 -1
  61. data/generated/google/apis/calendar_v3/classes.rb +208 -5
  62. data/generated/google/apis/calendar_v3/representations.rb +97 -0
  63. data/generated/google/apis/civicinfo_v2.rb +3 -2
  64. data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
  65. data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
  66. data/generated/google/apis/civicinfo_v2/service.rb +27 -6
  67. data/generated/google/apis/classroom_v1.rb +22 -25
  68. data/generated/google/apis/classroom_v1/classes.rb +998 -761
  69. data/generated/google/apis/classroom_v1/representations.rb +263 -198
  70. data/generated/google/apis/classroom_v1/service.rb +1349 -672
  71. data/generated/google/apis/cloudbilling_v1.rb +3 -3
  72. data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
  73. data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
  74. data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
  75. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  76. data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
  77. data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
  78. data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
  79. data/generated/google/apis/clouddebugger_v2.rb +5 -8
  80. data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
  81. data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
  82. data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
  83. data/generated/google/apis/cloudkms_v1.rb +35 -0
  84. data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
  85. data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
  86. data/generated/google/apis/cloudkms_v1/service.rb +933 -0
  87. data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
  88. data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
  89. data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
  90. data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
  91. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  92. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  93. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
  94. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
  95. data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
  96. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  97. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
  98. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
  99. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
  100. data/generated/google/apis/cloudtrace_v1.rb +9 -9
  101. data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
  102. data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
  103. data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
  104. data/generated/google/apis/compute_beta.rb +1 -1
  105. data/generated/google/apis/compute_beta/classes.rb +7007 -3648
  106. data/generated/google/apis/compute_beta/representations.rb +1459 -120
  107. data/generated/google/apis/compute_beta/service.rb +7943 -3726
  108. data/generated/google/apis/compute_v1.rb +1 -1
  109. data/generated/google/apis/compute_v1/classes.rb +2567 -370
  110. data/generated/google/apis/compute_v1/representations.rb +855 -0
  111. data/generated/google/apis/compute_v1/service.rb +6388 -2908
  112. data/generated/google/apis/container_v1.rb +1 -1
  113. data/generated/google/apis/container_v1/classes.rb +287 -16
  114. data/generated/google/apis/container_v1/representations.rb +113 -2
  115. data/generated/google/apis/container_v1/service.rb +130 -0
  116. data/generated/google/apis/content_v2.rb +1 -1
  117. data/generated/google/apis/content_v2/classes.rb +778 -10
  118. data/generated/google/apis/content_v2/representations.rb +339 -0
  119. data/generated/google/apis/content_v2/service.rb +364 -49
  120. data/generated/google/apis/dataflow_v1b3.rb +37 -0
  121. data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
  122. data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
  123. data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
  124. data/generated/google/apis/dataproc_v1.rb +1 -1
  125. data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
  126. data/generated/google/apis/dataproc_v1/representations.rb +299 -225
  127. data/generated/google/apis/dataproc_v1/service.rb +277 -192
  128. data/generated/google/apis/datastore_v1.rb +38 -0
  129. data/generated/google/apis/datastore_v1/classes.rb +1289 -0
  130. data/generated/google/apis/datastore_v1/representations.rb +572 -0
  131. data/generated/google/apis/datastore_v1/service.rb +259 -0
  132. data/generated/google/apis/datastore_v1beta3.rb +38 -0
  133. data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
  134. data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
  135. data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
  136. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  137. data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
  138. data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
  139. data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
  140. data/generated/google/apis/dfareporting_v2_5.rb +40 -0
  141. data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
  142. data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
  143. data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
  144. data/generated/google/apis/dfareporting_v2_6.rb +40 -0
  145. data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
  146. data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
  147. data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
  148. data/generated/google/apis/dfareporting_v2_7.rb +40 -0
  149. data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
  150. data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
  151. data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
  152. data/generated/google/apis/dns_v1.rb +1 -1
  153. data/generated/google/apis/dns_v1/classes.rb +1 -1
  154. data/generated/google/apis/dns_v2beta1.rb +43 -0
  155. data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
  156. data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
  157. data/generated/google/apis/dns_v2beta1/service.rb +768 -0
  158. data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
  159. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
  160. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
  161. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
  162. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  163. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  164. data/generated/google/apis/drive_v2.rb +1 -1
  165. data/generated/google/apis/drive_v2/classes.rb +595 -37
  166. data/generated/google/apis/drive_v2/representations.rb +140 -0
  167. data/generated/google/apis/drive_v2/service.rb +406 -40
  168. data/generated/google/apis/drive_v3.rb +1 -1
  169. data/generated/google/apis/drive_v3/classes.rb +507 -40
  170. data/generated/google/apis/drive_v3/representations.rb +105 -0
  171. data/generated/google/apis/drive_v3/service.rb +326 -29
  172. data/generated/google/apis/fitness_v1.rb +38 -2
  173. data/generated/google/apis/fitness_v1/classes.rb +65 -7
  174. data/generated/google/apis/fitness_v1/representations.rb +20 -0
  175. data/generated/google/apis/fitness_v1/service.rb +17 -18
  176. data/generated/google/apis/fusiontables_v2.rb +1 -1
  177. data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
  178. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  179. data/generated/google/apis/games_management_v1management.rb +1 -1
  180. data/generated/google/apis/games_v1.rb +1 -1
  181. data/generated/google/apis/genomics_v1.rb +10 -12
  182. data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
  183. data/generated/google/apis/genomics_v1/representations.rb +468 -496
  184. data/generated/google/apis/genomics_v1/service.rb +978 -882
  185. data/generated/google/apis/gmail_v1.rb +11 -2
  186. data/generated/google/apis/gmail_v1/classes.rb +655 -5
  187. data/generated/google/apis/gmail_v1/representations.rb +261 -0
  188. data/generated/google/apis/gmail_v1/service.rb +1211 -48
  189. data/generated/google/apis/groupssettings_v1.rb +2 -2
  190. data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
  191. data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
  192. data/generated/google/apis/iam_v1.rb +2 -2
  193. data/generated/google/apis/iam_v1/classes.rb +446 -368
  194. data/generated/google/apis/iam_v1/representations.rb +109 -91
  195. data/generated/google/apis/iam_v1/service.rb +249 -162
  196. data/generated/google/apis/identitytoolkit_v3.rb +7 -1
  197. data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
  198. data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
  199. data/generated/google/apis/kgsearch_v1.rb +2 -3
  200. data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
  201. data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
  202. data/generated/google/apis/kgsearch_v1/service.rb +26 -24
  203. data/generated/google/apis/language_v1beta1.rb +36 -0
  204. data/generated/google/apis/language_v1beta1/classes.rb +757 -0
  205. data/generated/google/apis/language_v1beta1/representations.rb +339 -0
  206. data/generated/google/apis/language_v1beta1/service.rb +185 -0
  207. data/generated/google/apis/licensing_v1.rb +3 -3
  208. data/generated/google/apis/licensing_v1/classes.rb +14 -2
  209. data/generated/google/apis/licensing_v1/representations.rb +2 -0
  210. data/generated/google/apis/licensing_v1/service.rb +1 -1
  211. data/generated/google/apis/logging_v2beta1.rb +6 -6
  212. data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
  213. data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
  214. data/generated/google/apis/logging_v2beta1/service.rb +427 -155
  215. data/generated/google/apis/manufacturers_v1.rb +34 -0
  216. data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
  217. data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
  218. data/generated/google/apis/manufacturers_v1/service.rb +138 -0
  219. data/generated/google/apis/mirror_v1.rb +2 -2
  220. data/generated/google/apis/mirror_v1/service.rb +1 -1
  221. data/generated/google/apis/monitoring_v3.rb +45 -0
  222. data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
  223. data/generated/google/apis/monitoring_v3/representations.rb +516 -0
  224. data/generated/google/apis/monitoring_v3/service.rb +706 -0
  225. data/generated/google/apis/oauth2_v2.rb +1 -1
  226. data/generated/google/apis/pagespeedonline_v2.rb +1 -1
  227. data/generated/google/apis/partners_v2.rb +3 -3
  228. data/generated/google/apis/partners_v2/classes.rb +1831 -477
  229. data/generated/google/apis/partners_v2/representations.rb +571 -114
  230. data/generated/google/apis/partners_v2/service.rb +898 -167
  231. data/generated/google/apis/people_v1.rb +15 -16
  232. data/generated/google/apis/people_v1/classes.rb +1047 -859
  233. data/generated/google/apis/people_v1/representations.rb +252 -213
  234. data/generated/google/apis/people_v1/service.rb +75 -62
  235. data/generated/google/apis/plus_domains_v1.rb +1 -1
  236. data/generated/google/apis/plus_v1.rb +1 -1
  237. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  238. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
  239. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
  240. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
  241. data/generated/google/apis/pubsub_v1.rb +1 -1
  242. data/generated/google/apis/pubsub_v1/classes.rb +363 -310
  243. data/generated/google/apis/pubsub_v1/representations.rb +76 -76
  244. data/generated/google/apis/pubsub_v1/service.rb +464 -335
  245. data/generated/google/apis/qpx_express_v1.rb +1 -1
  246. data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
  247. data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
  248. data/generated/google/apis/replicapool_v1beta2.rb +1 -1
  249. data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
  250. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
  251. data/generated/google/apis/reseller_v1.rb +1 -1
  252. data/generated/google/apis/reseller_v1/classes.rb +222 -61
  253. data/generated/google/apis/reseller_v1/representations.rb +28 -0
  254. data/generated/google/apis/reseller_v1/service.rb +240 -47
  255. data/generated/google/apis/script_v1.rb +19 -19
  256. data/generated/google/apis/script_v1/classes.rb +151 -137
  257. data/generated/google/apis/script_v1/representations.rb +26 -26
  258. data/generated/google/apis/script_v1/service.rb +9 -8
  259. data/generated/google/apis/sheets_v4.rb +7 -7
  260. data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
  261. data/generated/google/apis/sheets_v4/representations.rb +988 -737
  262. data/generated/google/apis/sheets_v4/service.rb +266 -99
  263. data/generated/google/apis/site_verification_v1.rb +1 -1
  264. data/generated/google/apis/slides_v1.rb +49 -0
  265. data/generated/google/apis/slides_v1/classes.rb +4480 -0
  266. data/generated/google/apis/slides_v1/representations.rb +1926 -0
  267. data/generated/google/apis/slides_v1/service.rb +245 -0
  268. data/generated/google/apis/speech_v1beta1.rb +34 -0
  269. data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
  270. data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
  271. data/generated/google/apis/speech_v1beta1/service.rb +270 -0
  272. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  273. data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
  274. data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
  275. data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
  276. data/generated/google/apis/storage_v1.rb +1 -1
  277. data/generated/google/apis/storage_v1/classes.rb +205 -21
  278. data/generated/google/apis/storage_v1/representations.rb +51 -1
  279. data/generated/google/apis/storage_v1/service.rb +263 -9
  280. data/generated/google/apis/tagmanager_v1.rb +5 -5
  281. data/generated/google/apis/translate_v2.rb +2 -2
  282. data/generated/google/apis/translate_v2/service.rb +1 -1
  283. data/generated/google/apis/vision_v1.rb +1 -1
  284. data/generated/google/apis/vision_v1/classes.rb +1275 -731
  285. data/generated/google/apis/vision_v1/representations.rb +378 -111
  286. data/generated/google/apis/vision_v1/service.rb +4 -4
  287. data/generated/google/apis/webmasters_v3.rb +1 -1
  288. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  289. data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
  290. data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
  291. data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
  292. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  293. data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
  294. data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
  295. data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
  296. data/generated/google/apis/youtube_v3.rb +1 -1
  297. data/generated/google/apis/youtube_v3/classes.rb +430 -22
  298. data/generated/google/apis/youtube_v3/representations.rb +171 -4
  299. data/generated/google/apis/youtube_v3/service.rb +100 -9
  300. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  301. data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
  302. data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
  303. data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
  304. data/google-api-client.gemspec +4 -3
  305. data/lib/google/apis/core/api_command.rb +16 -6
  306. data/lib/google/apis/core/base_service.rb +17 -9
  307. data/lib/google/apis/core/download.rb +7 -2
  308. data/lib/google/apis/core/http_command.rb +5 -1
  309. data/lib/google/apis/core/json_representation.rb +2 -2
  310. data/lib/google/apis/core/upload.rb +7 -1
  311. data/lib/google/apis/errors.rb +6 -2
  312. data/lib/google/apis/generator/annotator.rb +6 -0
  313. data/lib/google/apis/version.rb +1 -1
  314. data/samples/cli/lib/samples/bigquery.rb +101 -0
  315. data/samples/cli/lib/samples/calendar.rb +1 -1
  316. data/samples/cli/lib/samples/gmail.rb +74 -0
  317. data/samples/cli/lib/samples/sheets.rb +61 -0
  318. data/samples/cli/lib/samples/you_tube.rb +4 -1
  319. data/sync.rb +71 -0
  320. metadata +86 -18
@@ -47,410 +47,350 @@ module Google
47
47
  super('https://cloudresourcemanager.googleapis.com/', '')
48
48
  end
49
49
 
50
- # Creates a Project resource. Initially, the Project resource is owned by its
51
- # creator exclusively. The creator can later grant permission to others to read
52
- # or update the Project. Several APIs are activated automatically for the
53
- # Project, including Google Cloud Storage.
54
- # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
55
- # @param [String] fields
56
- # Selector specifying which fields to include in a partial response.
50
+ # Clears a `Policy` from a resource.
51
+ # @param [String] resource
52
+ # Name of the resource for the `Policy` to clear.
53
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest] clear_org_policy_request_object
57
54
  # @param [String] quota_user
58
55
  # Available to use for quota purposes for server-side applications. Can be any
59
56
  # 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::CloudresourcemanagerV1beta1::Project] parsed result object
65
- # @yieldparam err [StandardError] error object if request failed
66
- #
67
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
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 create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
73
- command = make_simple_command(:post, 'v1beta1/projects', options)
74
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
75
- command.request_object = project_object
76
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
77
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
78
- command.query['fields'] = fields unless fields.nil?
79
- command.query['quotaUser'] = quota_user unless quota_user.nil?
80
- execute_or_queue_command(command, &block)
81
- end
82
-
83
- # Lists Projects that are visible to the user and satisfy the specified filter.
84
- # This method returns Projects in an unspecified order. New Projects do not
85
- # necessarily appear at the end of the list.
86
- # @param [String] page_token
87
- # A pagination token returned from a previous call to ListProjects that
88
- # indicates from where listing should continue. Optional.
89
- # @param [Fixnum] page_size
90
- # The maximum number of Projects to return in the response. The server can
91
- # return fewer Projects than requested. If unspecified, server picks an
92
- # appropriate default. Optional.
93
- # @param [String] filter
94
- # An expression for filtering the results of the request. Filter rules are case
95
- # insensitive. The fields eligible for filtering are: + `name` + `id` + labels.
96
- # key where *key* is the name of a label Some examples of using labels as
97
- # filters: |Filter|Description| |------|-----------| |name:*|The project has a
98
- # name.| |name:Howl|The project's name is `Howl` or `howl`.| |name:HOWL|
99
- # Equivalent to above.| |NAME:howl|Equivalent to above.| |labels.color:*|The
100
- # project has the label `color`.| |labels.color:red|The project's label `color`
101
- # has the value `red`.| |labels.color:red label.size:big|The project's label `
102
- # color` has the value `red` and its label `size` has the value `big`. Optional.
103
57
  # @param [String] fields
104
58
  # Selector specifying which fields to include in a partial response.
105
- # @param [String] quota_user
106
- # Available to use for quota purposes for server-side applications. Can be any
107
- # arbitrary string assigned to a user, but should not exceed 40 characters.
108
59
  # @param [Google::Apis::RequestOptions] options
109
60
  # Request-specific options
110
61
  #
111
62
  # @yield [result, err] Result & error if block supplied
112
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] parsed result object
63
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
113
64
  # @yieldparam err [StandardError] error object if request failed
114
65
  #
115
- # @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse]
66
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
116
67
  #
117
68
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
118
69
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
119
70
  # @raise [Google::Apis::AuthorizationError] Authorization is required
120
- def list_projects(page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
121
- command = make_simple_command(:get, 'v1beta1/projects', options)
122
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation
123
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse
124
- command.query['pageToken'] = page_token unless page_token.nil?
125
- command.query['pageSize'] = page_size unless page_size.nil?
126
- command.query['filter'] = filter unless filter.nil?
127
- command.query['fields'] = fields unless fields.nil?
71
+ def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
72
+ command = make_simple_command(:post, 'v1beta1/{+resource}:clearOrgPolicy', options)
73
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest::Representation
74
+ command.request_object = clear_org_policy_request_object
75
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
76
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
77
+ command.params['resource'] = resource unless resource.nil?
128
78
  command.query['quotaUser'] = quota_user unless quota_user.nil?
79
+ command.query['fields'] = fields unless fields.nil?
129
80
  execute_or_queue_command(command, &block)
130
81
  end
131
82
 
132
- # Retrieves the Project identified by the specified `project_id` (for example, `
133
- # my-project-123`). The caller must have read permissions for this Project.
134
- # @param [String] project_id
135
- # The Project ID (for example, `my-project-123`). Required.
136
- # @param [String] fields
137
- # Selector specifying which fields to include in a partial response.
83
+ # Sets the access control policy on an Organization resource. Replaces any
84
+ # existing policy. The `resource` field should be the organization's resource
85
+ # name, e.g. "organizations/123".
86
+ # @param [String] resource
87
+ # REQUIRED: The resource for which the policy is being specified.
88
+ # See the operation documentation for the appropriate value for this field.
89
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
138
90
  # @param [String] quota_user
139
91
  # Available to use for quota purposes for server-side applications. Can be any
140
92
  # arbitrary string assigned to a user, but should not exceed 40 characters.
93
+ # @param [String] fields
94
+ # Selector specifying which fields to include in a partial response.
141
95
  # @param [Google::Apis::RequestOptions] options
142
96
  # Request-specific options
143
97
  #
144
98
  # @yield [result, err] Result & error if block supplied
145
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
99
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
146
100
  # @yieldparam err [StandardError] error object if request failed
147
101
  #
148
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
102
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
149
103
  #
150
104
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
151
105
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
152
106
  # @raise [Google::Apis::AuthorizationError] Authorization is required
153
- def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
154
- command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options)
155
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
156
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
157
- command.params['projectId'] = project_id unless project_id.nil?
158
- command.query['fields'] = fields unless fields.nil?
107
+ def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
108
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setIamPolicy', options)
109
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
110
+ command.request_object = set_iam_policy_request_object
111
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
112
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
113
+ command.params['resource'] = resource unless resource.nil?
159
114
  command.query['quotaUser'] = quota_user unless quota_user.nil?
115
+ command.query['fields'] = fields unless fields.nil?
160
116
  execute_or_queue_command(command, &block)
161
117
  end
162
118
 
163
- # Updates the attributes of the Project identified by the specified `project_id`
164
- # (for example, `my-project-123`). The caller must have modify permissions for
165
- # this Project.
166
- # @param [String] project_id
167
- # The project ID (for example, `my-project-123`). Required.
168
- # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
169
- # @param [String] fields
170
- # Selector specifying which fields to include in a partial response.
119
+ # Lists `Constraints` that could be applied on the specified resource.
120
+ # @param [String] resource
121
+ # Name of the resource to list `Constraints` for.
122
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
171
123
  # @param [String] quota_user
172
124
  # Available to use for quota purposes for server-side applications. Can be any
173
125
  # arbitrary string assigned to a user, but should not exceed 40 characters.
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
174
128
  # @param [Google::Apis::RequestOptions] options
175
129
  # Request-specific options
176
130
  #
177
131
  # @yield [result, err] Result & error if block supplied
178
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
132
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
179
133
  # @yieldparam err [StandardError] error object if request failed
180
134
  #
181
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
135
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse]
182
136
  #
183
137
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
184
138
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
185
139
  # @raise [Google::Apis::AuthorizationError] Authorization is required
186
- def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
187
- command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options)
188
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
189
- command.request_object = project_object
190
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
191
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
192
- command.params['projectId'] = project_id unless project_id.nil?
193
- command.query['fields'] = fields unless fields.nil?
140
+ def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
141
+ command = make_simple_command(:post, 'v1beta1/{+resource}:listAvailableOrgPolicyConstraints', options)
142
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsRequest::Representation
143
+ command.request_object = list_available_org_policy_constraints_request_object
144
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse::Representation
145
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListAvailableOrgPolicyConstraintsResponse
146
+ command.params['resource'] = resource unless resource.nil?
194
147
  command.query['quotaUser'] = quota_user unless quota_user.nil?
148
+ command.query['fields'] = fields unless fields.nil?
195
149
  execute_or_queue_command(command, &block)
196
150
  end
197
151
 
198
- # Marks the Project identified by the specified `project_id` (for example, `my-
199
- # project-123`) for deletion. This method will only affect the Project if the
200
- # following criteria are met: + The Project does not have a billing account
201
- # associated with it. + The Project has a lifecycle state of ACTIVE. This method
202
- # changes the Project's lifecycle state from ACTIVE to DELETE_REQUESTED. The
203
- # deletion starts at an unspecified time, at which point the lifecycle state
204
- # changes to DELETE_IN_PROGRESS. Until the deletion completes, you can check the
205
- # lifecycle state checked by retrieving the Project with GetProject, and the
206
- # Project remains visible to ListProjects. However, you cannot update the
207
- # project. After the deletion completes, the Project is not retrievable by the
208
- # GetProject and ListProjects methods. The caller must have modify permissions
209
- # for this Project.
210
- # @param [String] project_id
211
- # The Project ID (for example, `foo-bar-123`). Required.
212
- # @param [String] fields
213
- # Selector specifying which fields to include in a partial response.
152
+ # Gets the access control policy for an Organization resource. May be empty
153
+ # if no such policy or resource exists. The `resource` field should be the
154
+ # organization's resource name, e.g. "organizations/123".
155
+ # @param [String] resource
156
+ # REQUIRED: The resource for which the policy is being requested.
157
+ # See the operation documentation for the appropriate value for this field.
158
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
214
159
  # @param [String] quota_user
215
160
  # Available to use for quota purposes for server-side applications. Can be any
216
161
  # arbitrary string assigned to a user, but should not exceed 40 characters.
162
+ # @param [String] fields
163
+ # Selector specifying which fields to include in a partial response.
217
164
  # @param [Google::Apis::RequestOptions] options
218
165
  # Request-specific options
219
166
  #
220
167
  # @yield [result, err] Result & error if block supplied
221
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
168
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
222
169
  # @yieldparam err [StandardError] error object if request failed
223
170
  #
224
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
171
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
225
172
  #
226
173
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
227
174
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
228
175
  # @raise [Google::Apis::AuthorizationError] Authorization is required
229
- def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
230
- command = make_simple_command(:delete, 'v1beta1/projects/{projectId}', options)
231
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
232
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
233
- command.params['projectId'] = project_id unless project_id.nil?
234
- command.query['fields'] = fields unless fields.nil?
176
+ def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
177
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getIamPolicy', options)
178
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
179
+ command.request_object = get_iam_policy_request_object
180
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
181
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
182
+ command.params['resource'] = resource unless resource.nil?
235
183
  command.query['quotaUser'] = quota_user unless quota_user.nil?
184
+ command.query['fields'] = fields unless fields.nil?
236
185
  execute_or_queue_command(command, &block)
237
186
  end
238
187
 
239
- # Restores the Project identified by the specified `project_id` (for example, `
240
- # my-project-123`). You can only use this method for a Project that has a
241
- # lifecycle state of DELETE_REQUESTED. After deletion starts, as indicated by a
242
- # lifecycle state of DELETE_IN_PROGRESS, the Project cannot be restored. The
243
- # caller must have modify permissions for this Project.
244
- # @param [String] project_id
245
- # The project ID (for example, `foo-bar-123`). Required.
246
- # @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object
247
- # @param [String] fields
248
- # Selector specifying which fields to include in a partial response.
188
+ # Gets a `Policy` on a resource.
189
+ # If no `Policy` is set on the resource, a `Policy` is returned with default
190
+ # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
191
+ # `etag` value can be used with `SetOrgPolicy()` to create or update a
192
+ # `Policy` during read-modify-write.
193
+ # @param [String] resource
194
+ # Name of the resource the `Policy` is set on.
195
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest] get_org_policy_request_object
249
196
  # @param [String] quota_user
250
197
  # Available to use for quota purposes for server-side applications. Can be any
251
198
  # arbitrary string assigned to a user, but should not exceed 40 characters.
199
+ # @param [String] fields
200
+ # Selector specifying which fields to include in a partial response.
252
201
  # @param [Google::Apis::RequestOptions] options
253
202
  # Request-specific options
254
203
  #
255
204
  # @yield [result, err] Result & error if block supplied
256
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
205
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] parsed result object
257
206
  # @yieldparam err [StandardError] error object if request failed
258
207
  #
259
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
208
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy]
260
209
  #
261
210
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
262
211
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
263
212
  # @raise [Google::Apis::AuthorizationError] Authorization is required
264
- def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
265
- command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options)
266
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation
267
- command.request_object = undelete_project_request_object
268
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
269
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
270
- command.params['projectId'] = project_id unless project_id.nil?
271
- command.query['fields'] = fields unless fields.nil?
213
+ def get_organization_org_policy(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
214
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getOrgPolicy', options)
215
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest::Representation
216
+ command.request_object = get_org_policy_request_object
217
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation
218
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy
219
+ command.params['resource'] = resource unless resource.nil?
272
220
  command.query['quotaUser'] = quota_user unless quota_user.nil?
221
+ command.query['fields'] = fields unless fields.nil?
273
222
  execute_or_queue_command(command, &block)
274
223
  end
275
224
 
276
- # Gets a list of ancestors in the resource hierarchy for the Project identified
277
- # by the specified `project_id` (for example, `my-project-123`). The caller must
278
- # have read permissions for this Project.
279
- # @param [String] project_id
280
- # The Project ID (for example, `my-project-123`). Required.
281
- # @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object
282
- # @param [String] fields
283
- # Selector specifying which fields to include in a partial response.
225
+ # Gets a `Policy` on a resource.
226
+ # If no `Policy` is set on the resource, a `Policy` is returned with default
227
+ # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
228
+ # `etag` value can be used with `SetOrgPolicy()` to create or update a
229
+ # `Policy` during read-modify-write.
230
+ # @param [String] resource
231
+ # Name of the resource the `Policy` is set on.
232
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest] get_org_policy_request_object
284
233
  # @param [String] quota_user
285
234
  # Available to use for quota purposes for server-side applications. Can be any
286
235
  # arbitrary string assigned to a user, but should not exceed 40 characters.
236
+ # @param [String] fields
237
+ # Selector specifying which fields to include in a partial response.
287
238
  # @param [Google::Apis::RequestOptions] options
288
239
  # Request-specific options
289
240
  #
290
241
  # @yield [result, err] Result & error if block supplied
291
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object
242
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] parsed result object
292
243
  # @yieldparam err [StandardError] error object if request failed
293
244
  #
294
- # @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse]
245
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy]
295
246
  #
296
247
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
248
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
249
  # @raise [Google::Apis::AuthorizationError] Authorization is required
299
- def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
300
- command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options)
301
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation
302
- command.request_object = get_ancestry_request_object
303
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation
304
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse
305
- command.params['projectId'] = project_id unless project_id.nil?
306
- command.query['fields'] = fields unless fields.nil?
250
+ def get_organization_org_policy_v1(resource, get_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
251
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getOrgPolicyV1', options)
252
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetOrgPolicyRequest::Representation
253
+ command.request_object = get_org_policy_request_object
254
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation
255
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy
256
+ command.params['resource'] = resource unless resource.nil?
307
257
  command.query['quotaUser'] = quota_user unless quota_user.nil?
258
+ command.query['fields'] = fields unless fields.nil?
308
259
  execute_or_queue_command(command, &block)
309
260
  end
310
261
 
311
- # Returns the IAM access control policy for the specified Project. Permission is
312
- # denied if the policy or the resource does not exist.
262
+ # Gets the effective `Policy` on a resource. This is the result of merging
263
+ # `Policies` in the resource hierarchy. The returned `Policy` will not have
264
+ # an `etag`set because it is a computed `Policy` across multiple resources.
313
265
  # @param [String] resource
314
- # REQUIRED: The resource for which the policy is being requested. `resource` is
315
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
316
- # disk*`. The format for the path specified in this value is resource specific
317
- # and is specified in the `getIamPolicy` documentation.
318
- # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
319
- # @param [String] fields
320
- # Selector specifying which fields to include in a partial response.
266
+ # The name of the resource to start computing the effective `Policy`.
267
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
321
268
  # @param [String] quota_user
322
269
  # Available to use for quota purposes for server-side applications. Can be any
323
270
  # arbitrary string assigned to a user, but should not exceed 40 characters.
271
+ # @param [String] fields
272
+ # Selector specifying which fields to include in a partial response.
324
273
  # @param [Google::Apis::RequestOptions] options
325
274
  # Request-specific options
326
275
  #
327
276
  # @yield [result, err] Result & error if block supplied
328
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
277
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] parsed result object
329
278
  # @yieldparam err [StandardError] error object if request failed
330
279
  #
331
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
280
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy]
332
281
  #
333
282
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
334
283
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
335
284
  # @raise [Google::Apis::AuthorizationError] Authorization is required
336
- def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
337
- command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options)
338
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
339
- command.request_object = get_iam_policy_request_object
340
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
341
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
285
+ def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
286
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getEffectiveOrgPolicy', options)
287
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest::Representation
288
+ command.request_object = get_effective_org_policy_request_object
289
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation
290
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy
342
291
  command.params['resource'] = resource unless resource.nil?
343
- command.query['fields'] = fields unless fields.nil?
344
292
  command.query['quotaUser'] = quota_user unless quota_user.nil?
293
+ command.query['fields'] = fields unless fields.nil?
345
294
  execute_or_queue_command(command, &block)
346
295
  end
347
296
 
348
- # Sets the IAM access control policy for the specified Project. Replaces any
349
- # existing policy. The following constraints apply when using `setIamPolicy()`: +
350
- # Project currently supports only `user:`emailid`` and `serviceAccount:`emailid`
351
- # ` members in a `Binding` of a `Policy`. + To be added as an `owner`, a user
352
- # must be invited via Cloud Platform console and must accept the invitation. +
353
- # Members cannot be added to more than one role in the same policy. + There must
354
- # be at least one owner who has accepted the Terms of Service (ToS) agreement in
355
- # the policy. Calling `setIamPolicy()` to to remove the last ToS-accepted owner
356
- # from the policy will fail. + Calling this method requires enabling the App
357
- # Engine Admin API. Note: Removing service accounts from policies or changing
358
- # their roles can render services completely inoperable. It is important to
359
- # understand how the service account is being used before removing or updating
360
- # its roles.
361
- # @param [String] resource
362
- # REQUIRED: The resource for which the policy is being specified. `resource` is
363
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
364
- # disk*`. The format for the path specified in this value is resource specific
365
- # and is specified in the `setIamPolicy` documentation.
366
- # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
367
- # @param [String] fields
368
- # Selector specifying which fields to include in a partial response.
297
+ # Updates an Organization resource identified by the specified resource name.
298
+ # @param [String] name
299
+ # Output Only. The resource name of the organization. This is the
300
+ # organization's relative path in the API. Its format is
301
+ # "organizations/[organization_id]". For example, "organizations/1234".
302
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_object
369
303
  # @param [String] quota_user
370
304
  # Available to use for quota purposes for server-side applications. Can be any
371
305
  # arbitrary string assigned to a user, but should not exceed 40 characters.
306
+ # @param [String] fields
307
+ # Selector specifying which fields to include in a partial response.
372
308
  # @param [Google::Apis::RequestOptions] options
373
309
  # Request-specific options
374
310
  #
375
311
  # @yield [result, err] Result & error if block supplied
376
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
312
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
377
313
  # @yieldparam err [StandardError] error object if request failed
378
314
  #
379
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
315
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
380
316
  #
381
317
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
382
318
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
383
319
  # @raise [Google::Apis::AuthorizationError] Authorization is required
384
- def set_project_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
385
- command = make_simple_command(:post, 'v1beta1/projects/{resource}:setIamPolicy', options)
386
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
387
- command.request_object = set_iam_policy_request_object
388
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
389
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
390
- command.params['resource'] = resource unless resource.nil?
391
- command.query['fields'] = fields unless fields.nil?
320
+ def update_organization(name, organization_object = nil, quota_user: nil, fields: nil, options: nil, &block)
321
+ command = make_simple_command(:put, 'v1beta1/{+name}', options)
322
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
323
+ command.request_object = organization_object
324
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
325
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
326
+ command.params['name'] = name unless name.nil?
392
327
  command.query['quotaUser'] = quota_user unless quota_user.nil?
328
+ command.query['fields'] = fields unless fields.nil?
393
329
  execute_or_queue_command(command, &block)
394
330
  end
395
331
 
396
- # Returns permissions that a caller has on the specified Project.
332
+ # Updates the specified `Policy` on the resource. Creates a new `Policy` for
333
+ # that `Constraint` on the resource if one does not exist.
334
+ # Not supplying an `etag` on the request `Policy` results in an unconditional
335
+ # write of the `Policy`.
397
336
  # @param [String] resource
398
- # REQUIRED: The resource for which the policy detail is being requested. `
399
- # resource` is usually specified as a path, such as `projects/*project*/zones/*
400
- # zone*/disks/*disk*`. The format for the path specified in this value is
401
- # resource specific and is specified in the `testIamPermissions` documentation.
402
- # @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
403
- # @param [String] fields
404
- # Selector specifying which fields to include in a partial response.
337
+ # Resource name of the resource to attach the `Policy`.
338
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest] set_org_policy_request_object
405
339
  # @param [String] quota_user
406
340
  # Available to use for quota purposes for server-side applications. Can be any
407
341
  # arbitrary string assigned to a user, but should not exceed 40 characters.
342
+ # @param [String] fields
343
+ # Selector specifying which fields to include in a partial response.
408
344
  # @param [Google::Apis::RequestOptions] options
409
345
  # Request-specific options
410
346
  #
411
347
  # @yield [result, err] Result & error if block supplied
412
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse] parsed result object
348
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] parsed result object
413
349
  # @yieldparam err [StandardError] error object if request failed
414
350
  #
415
- # @return [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse]
351
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy]
416
352
  #
417
353
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
418
354
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
419
355
  # @raise [Google::Apis::AuthorizationError] Authorization is required
420
- def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
421
- command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options)
422
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
423
- command.request_object = test_iam_permissions_request_object
424
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
425
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
356
+ def set_organization_org_policy_v1(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
357
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setOrgPolicyV1', options)
358
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest::Representation
359
+ command.request_object = set_org_policy_request_object
360
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation
361
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy
426
362
  command.params['resource'] = resource unless resource.nil?
427
- command.query['fields'] = fields unless fields.nil?
428
363
  command.query['quotaUser'] = quota_user unless quota_user.nil?
364
+ command.query['fields'] = fields unless fields.nil?
429
365
  execute_or_queue_command(command, &block)
430
366
  end
431
367
 
432
- # Lists Organization resources that are visible to the user and satisfy the
433
- # specified filter. This method returns Organizations in an unspecified order.
434
- # New Organizations do not necessarily appear at the end of the list.
435
- # @param [Fixnum] page_size
436
- # The maximum number of Organizations to return in the response. This field is
437
- # optional.
438
- # @param [String] page_token
439
- # A pagination token returned from a previous call to `ListOrganizations` that
440
- # indicates from where listing should continue. This field is optional.
368
+ # Lists Organization resources that are visible to the user and satisfy
369
+ # the specified filter. This method returns Organizations in an unspecified
370
+ # order. New Organizations do not necessarily appear at the end of the list.
441
371
  # @param [String] filter
442
- # An optional query string used to filter the Organizations to return in the
443
- # response. Filter rules are case-insensitive. Organizations may be filtered by `
444
- # owner.directoryCustomerId` or by `domain`, where the domain is a Google for
445
- # Work domain, for example: |Filter|Description| |------|-----------| |owner.
446
- # directorycustomerid:123456789|Organizations with `owner.directory_customer_id`
447
- # equal to `123456789`.| |domain:google.com|Organizations corresponding to the
448
- # domain `google.com`.| This field is optional.
449
- # @param [String] fields
450
- # Selector specifying which fields to include in a partial response.
372
+ # An optional query string used to filter the Organizations to return in
373
+ # the response. Filter rules are case-insensitive.
374
+ # Organizations may be filtered by `owner.directoryCustomerId` or by
375
+ # `domain`, where the domain is a Google for Work domain, for example:
376
+ # |Filter|Description|
377
+ # |------|-----------|
378
+ # |owner.directorycustomerid:123456789|Organizations with `owner.
379
+ # directory_customer_id` equal to `123456789`.|
380
+ # |domain:google.com|Organizations corresponding to the domain `google.com`.|
381
+ # This field is optional.
382
+ # @param [String] page_token
383
+ # A pagination token returned from a previous call to `ListOrganizations`
384
+ # that indicates from where listing should continue.
385
+ # This field is optional.
386
+ # @param [Fixnum] page_size
387
+ # The maximum number of Organizations to return in the response.
388
+ # This field is optional.
451
389
  # @param [String] quota_user
452
390
  # Available to use for quota purposes for server-side applications. Can be any
453
391
  # arbitrary string assigned to a user, but should not exceed 40 characters.
392
+ # @param [String] fields
393
+ # Selector specifying which fields to include in a partial response.
454
394
  # @param [Google::Apis::RequestOptions] options
455
395
  # Request-specific options
456
396
  #
@@ -463,132 +403,299 @@ module Google
463
403
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
464
404
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
465
405
  # @raise [Google::Apis::AuthorizationError] Authorization is required
466
- def list_organizations(page_size: nil, page_token: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
406
+ def list_organizations(filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
467
407
  command = make_simple_command(:get, 'v1beta1/organizations', options)
468
408
  command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse::Representation
469
409
  command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrganizationsResponse
470
- command.query['pageSize'] = page_size unless page_size.nil?
471
- command.query['pageToken'] = page_token unless page_token.nil?
472
410
  command.query['filter'] = filter unless filter.nil?
473
- command.query['fields'] = fields unless fields.nil?
411
+ command.query['pageToken'] = page_token unless page_token.nil?
412
+ command.query['pageSize'] = page_size unless page_size.nil?
474
413
  command.query['quotaUser'] = quota_user unless quota_user.nil?
414
+ command.query['fields'] = fields unless fields.nil?
475
415
  execute_or_queue_command(command, &block)
476
416
  end
477
417
 
478
- # Fetches an Organization resource identified by the specified `organization_id`.
479
- # @param [String] organization_id
480
- # The id of the Organization resource to fetch.
481
- # @param [String] fields
482
- # Selector specifying which fields to include in a partial response.
418
+ # Updates the specified `Policy` on the resource. Creates a new `Policy` for
419
+ # that `Constraint` on the resource if one does not exist.
420
+ # Not supplying an `etag` on the request `Policy` results in an unconditional
421
+ # write of the `Policy`.
422
+ # @param [String] resource
423
+ # Resource name of the resource to attach the `Policy`.
424
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest] set_org_policy_request_object
483
425
  # @param [String] quota_user
484
426
  # Available to use for quota purposes for server-side applications. Can be any
485
427
  # arbitrary string assigned to a user, but should not exceed 40 characters.
428
+ # @param [String] fields
429
+ # Selector specifying which fields to include in a partial response.
486
430
  # @param [Google::Apis::RequestOptions] options
487
431
  # Request-specific options
488
432
  #
489
433
  # @yield [result, err] Result & error if block supplied
490
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
434
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] parsed result object
491
435
  # @yieldparam err [StandardError] error object if request failed
492
436
  #
493
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
437
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy]
494
438
  #
495
439
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
496
440
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
497
441
  # @raise [Google::Apis::AuthorizationError] Authorization is required
498
- def get_organization(organization_id, fields: nil, quota_user: nil, options: nil, &block)
499
- command = make_simple_command(:get, 'v1beta1/organizations/{organizationId}', options)
500
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
501
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
502
- command.params['organizationId'] = organization_id unless organization_id.nil?
503
- command.query['fields'] = fields unless fields.nil?
442
+ def set_organization_org_policy(resource, set_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
443
+ command = make_simple_command(:post, 'v1beta1/{+resource}:setOrgPolicy', options)
444
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetOrgPolicyRequest::Representation
445
+ command.request_object = set_org_policy_request_object
446
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation
447
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy
448
+ command.params['resource'] = resource unless resource.nil?
504
449
  command.query['quotaUser'] = quota_user unless quota_user.nil?
450
+ command.query['fields'] = fields unless fields.nil?
505
451
  execute_or_queue_command(command, &block)
506
452
  end
507
453
 
508
- # Updates an Organization resource identified by the specified `organization_id`.
509
- # @param [String] organization_id
510
- # An immutable id for the Organization that is assigned on creation. This should
511
- # be omitted when creating a new Organization. This field is read-only.
512
- # @param [Google::Apis::CloudresourcemanagerV1beta1::Organization] organization_object
513
- # @param [String] fields
514
- # Selector specifying which fields to include in a partial response.
454
+ # Clears a `Policy` from a resource.
455
+ # @param [String] resource
456
+ # Name of the resource for the `Policy` to clear.
457
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest] clear_org_policy_request_object
515
458
  # @param [String] quota_user
516
459
  # Available to use for quota purposes for server-side applications. Can be any
517
460
  # arbitrary string assigned to a user, but should not exceed 40 characters.
461
+ # @param [String] fields
462
+ # Selector specifying which fields to include in a partial response.
518
463
  # @param [Google::Apis::RequestOptions] options
519
464
  # Request-specific options
520
465
  #
521
466
  # @yield [result, err] Result & error if block supplied
522
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
467
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
523
468
  # @yieldparam err [StandardError] error object if request failed
524
469
  #
525
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
470
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
526
471
  #
527
472
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
528
473
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
529
474
  # @raise [Google::Apis::AuthorizationError] Authorization is required
530
- def update_organization(organization_id, organization_object = nil, fields: nil, quota_user: nil, options: nil, &block)
531
- command = make_simple_command(:put, 'v1beta1/organizations/{organizationId}', options)
532
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
533
- command.request_object = organization_object
534
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
535
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
536
- command.params['organizationId'] = organization_id unless organization_id.nil?
537
- command.query['fields'] = fields unless fields.nil?
475
+ def clear_organization_org_policy_v1(resource, clear_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
476
+ command = make_simple_command(:post, 'v1beta1/{+resource}:clearOrgPolicyV1', options)
477
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ClearOrgPolicyRequest::Representation
478
+ command.request_object = clear_org_policy_request_object
479
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
480
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
481
+ command.params['resource'] = resource unless resource.nil?
538
482
  command.query['quotaUser'] = quota_user unless quota_user.nil?
483
+ command.query['fields'] = fields unless fields.nil?
539
484
  execute_or_queue_command(command, &block)
540
485
  end
541
486
 
542
- # Sets the access control policy on an Organization resource. Replaces any
543
- # existing policy.
487
+ # Lists all the `Policies` set for a particular resource.
544
488
  # @param [String] resource
545
- # REQUIRED: The resource for which the policy is being specified. `resource` is
546
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
547
- # disk*`. The format for the path specified in this value is resource specific
548
- # and is specified in the `setIamPolicy` documentation.
549
- # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
550
- # @param [String] fields
551
- # Selector specifying which fields to include in a partial response.
489
+ # Name of the resource to list Policies for.
490
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesRequest] list_org_policies_request_object
552
491
  # @param [String] quota_user
553
492
  # Available to use for quota purposes for server-side applications. Can be any
554
493
  # arbitrary string assigned to a user, but should not exceed 40 characters.
494
+ # @param [String] fields
495
+ # Selector specifying which fields to include in a partial response.
555
496
  # @param [Google::Apis::RequestOptions] options
556
497
  # Request-specific options
557
498
  #
558
499
  # @yield [result, err] Result & error if block supplied
559
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
500
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse] parsed result object
560
501
  # @yieldparam err [StandardError] error object if request failed
561
502
  #
562
- # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
503
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse]
563
504
  #
564
505
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
565
506
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
566
507
  # @raise [Google::Apis::AuthorizationError] Authorization is required
567
- def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
568
- command = make_simple_command(:post, 'v1beta1/organizations/{resource}:setIamPolicy', options)
569
- command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
570
- command.request_object = set_iam_policy_request_object
571
- command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
572
- command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
508
+ def list_organization_org_policies(resource, list_org_policies_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
509
+ command = make_simple_command(:post, 'v1beta1/{+resource}:listOrgPolicies', options)
510
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesRequest::Representation
511
+ command.request_object = list_org_policies_request_object
512
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse::Representation
513
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListOrgPoliciesResponse
573
514
  command.params['resource'] = resource unless resource.nil?
515
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
574
516
  command.query['fields'] = fields unless fields.nil?
517
+ execute_or_queue_command(command, &block)
518
+ end
519
+
520
+ # Fetches an Organization resource identified by the specified resource name.
521
+ # @param [String] name
522
+ # The resource name of the Organization to fetch, e.g. "organizations/1234".
523
+ # @param [String] organization_id
524
+ # The id of the Organization resource to fetch.
525
+ # This field is deprecated and will be removed in v1. Use name instead.
526
+ # @param [String] quota_user
527
+ # Available to use for quota purposes for server-side applications. Can be any
528
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
529
+ # @param [String] fields
530
+ # Selector specifying which fields to include in a partial response.
531
+ # @param [Google::Apis::RequestOptions] options
532
+ # Request-specific options
533
+ #
534
+ # @yield [result, err] Result & error if block supplied
535
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Organization] parsed result object
536
+ # @yieldparam err [StandardError] error object if request failed
537
+ #
538
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Organization]
539
+ #
540
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
541
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
542
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
543
+ def get_organization(name, organization_id: nil, quota_user: nil, fields: nil, options: nil, &block)
544
+ command = make_simple_command(:get, 'v1beta1/{+name}', options)
545
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Organization::Representation
546
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Organization
547
+ command.params['name'] = name unless name.nil?
548
+ command.query['organizationId'] = organization_id unless organization_id.nil?
575
549
  command.query['quotaUser'] = quota_user unless quota_user.nil?
550
+ command.query['fields'] = fields unless fields.nil?
576
551
  execute_or_queue_command(command, &block)
577
552
  end
578
553
 
579
- # Gets the access control policy for an Organization resource. May be empty if
580
- # no such policy or resource exists.
554
+ # Returns permissions that a caller has on the specified Organization.
555
+ # The `resource` field should be the organization's resource name,
556
+ # e.g. "organizations/123".
581
557
  # @param [String] resource
582
- # REQUIRED: The resource for which the policy is being requested. `resource` is
583
- # usually specified as a path, such as `projects/*project*/zones/*zone*/disks/*
584
- # disk*`. The format for the path specified in this value is resource specific
585
- # and is specified in the `getIamPolicy` documentation.
586
- # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
558
+ # REQUIRED: The resource for which the policy detail is being requested.
559
+ # See the operation documentation for the appropriate value for this field.
560
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
561
+ # @param [String] quota_user
562
+ # Available to use for quota purposes for server-side applications. Can be any
563
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
564
+ # @param [String] fields
565
+ # Selector specifying which fields to include in a partial response.
566
+ # @param [Google::Apis::RequestOptions] options
567
+ # Request-specific options
568
+ #
569
+ # @yield [result, err] Result & error if block supplied
570
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse] parsed result object
571
+ # @yieldparam err [StandardError] error object if request failed
572
+ #
573
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse]
574
+ #
575
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
576
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
577
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
578
+ def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
579
+ command = make_simple_command(:post, 'v1beta1/{+resource}:testIamPermissions', options)
580
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
581
+ command.request_object = test_iam_permissions_request_object
582
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
583
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
584
+ command.params['resource'] = resource unless resource.nil?
585
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
586
+ command.query['fields'] = fields unless fields.nil?
587
+ execute_or_queue_command(command, &block)
588
+ end
589
+
590
+ # Gets the effective `Policy` on a resource. This is the result of merging
591
+ # `Policies` in the resource hierarchy. The returned `Policy` will not have
592
+ # an `etag`set because it is a computed `Policy` across multiple resources.
593
+ # @param [String] resource
594
+ # The name of the resource to start computing the effective `Policy`.
595
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
596
+ # @param [String] quota_user
597
+ # Available to use for quota purposes for server-side applications. Can be any
598
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
599
+ # @param [String] fields
600
+ # Selector specifying which fields to include in a partial response.
601
+ # @param [Google::Apis::RequestOptions] options
602
+ # Request-specific options
603
+ #
604
+ # @yield [result, err] Result & error if block supplied
605
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy] parsed result object
606
+ # @yieldparam err [StandardError] error object if request failed
607
+ #
608
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy]
609
+ #
610
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
611
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
612
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
613
+ def get_organization_effective_org_policy_v1(resource, get_effective_org_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
614
+ command = make_simple_command(:post, 'v1beta1/{+resource}:getEffectiveOrgPolicyV1', options)
615
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetEffectiveOrgPolicyRequest::Representation
616
+ command.request_object = get_effective_org_policy_request_object
617
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy::Representation
618
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::OrgPolicy
619
+ command.params['resource'] = resource unless resource.nil?
620
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
621
+ command.query['fields'] = fields unless fields.nil?
622
+ execute_or_queue_command(command, &block)
623
+ end
624
+
625
+ # Creates a Project resource.
626
+ # Initially, the Project resource is owned by its creator exclusively.
627
+ # The creator can later grant permission to others to read or update the
628
+ # Project.
629
+ # Several APIs are activated automatically for the Project, including
630
+ # Google Cloud Storage.
631
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
632
+ # @param [Boolean] use_legacy_stack
633
+ # A safety hatch to opt out of the new reliable project creation process.
634
+ # @param [String] quota_user
635
+ # Available to use for quota purposes for server-side applications. Can be any
636
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
587
637
  # @param [String] fields
588
638
  # Selector specifying which fields to include in a partial response.
639
+ # @param [Google::Apis::RequestOptions] options
640
+ # Request-specific options
641
+ #
642
+ # @yield [result, err] Result & error if block supplied
643
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
644
+ # @yieldparam err [StandardError] error object if request failed
645
+ #
646
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
647
+ #
648
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
649
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
650
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
651
+ def create_project(project_object = nil, use_legacy_stack: nil, quota_user: nil, fields: nil, options: nil, &block)
652
+ command = make_simple_command(:post, 'v1beta1/projects', options)
653
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
654
+ command.request_object = project_object
655
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
656
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
657
+ command.query['useLegacyStack'] = use_legacy_stack unless use_legacy_stack.nil?
658
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
659
+ command.query['fields'] = fields unless fields.nil?
660
+ execute_or_queue_command(command, &block)
661
+ end
662
+
663
+ # Sets the IAM access control policy for the specified Project. Replaces
664
+ # any existing policy.
665
+ # The following constraints apply when using `setIamPolicy()`:
666
+ # + Project does not support `allUsers` and `allAuthenticatedUsers` as
667
+ # `members` in a `Binding` of a `Policy`.
668
+ # + The owner role can be granted only to `user` and `serviceAccount`.
669
+ # + Service accounts can be made owners of a project directly
670
+ # without any restrictions. However, to be added as an owner, a user must be
671
+ # invited via Cloud Platform console and must accept the invitation.
672
+ # + A user cannot be granted the owner role using `setIamPolicy()`. The user
673
+ # must be granted the owner role using the Cloud Platform Console and must
674
+ # explicitly accept the invitation.
675
+ # + Invitations to grant the owner role cannot be sent using
676
+ # `setIamPolicy()`; they must be sent only using the Cloud Platform Console.
677
+ # + Membership changes that leave the project without any owners that have
678
+ # accepted the Terms of Service (ToS) will be rejected.
679
+ # + There must be at least one owner who has accepted the Terms of
680
+ # Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
681
+ # remove the last ToS-accepted owner from the policy will fail. This
682
+ # restriction also applies to legacy projects that no longer have owners
683
+ # who have accepted the ToS. Edits to IAM policies will be rejected until
684
+ # the lack of a ToS-accepting owner is rectified.
685
+ # + Calling this method requires enabling the App Engine Admin API.
686
+ # Note: Removing service accounts from policies or changing their roles
687
+ # can render services completely inoperable. It is important to understand
688
+ # how the service account is being used before removing or updating its
689
+ # roles.
690
+ # @param [String] resource
691
+ # REQUIRED: The resource for which the policy is being specified.
692
+ # See the operation documentation for the appropriate value for this field.
693
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest] set_iam_policy_request_object
589
694
  # @param [String] quota_user
590
695
  # Available to use for quota purposes for server-side applications. Can be any
591
696
  # arbitrary string assigned to a user, but should not exceed 40 characters.
697
+ # @param [String] fields
698
+ # Selector specifying which fields to include in a partial response.
592
699
  # @param [Google::Apis::RequestOptions] options
593
700
  # Request-specific options
594
701
  #
@@ -601,30 +708,207 @@ module Google
601
708
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
602
709
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
603
710
  # @raise [Google::Apis::AuthorizationError] Authorization is required
604
- def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
605
- command = make_simple_command(:post, 'v1beta1/organizations/{resource}:getIamPolicy', options)
711
+ def set_project_iam_policy(resource, set_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
712
+ command = make_simple_command(:post, 'v1beta1/projects/{resource}:setIamPolicy', options)
713
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::SetIamPolicyRequest::Representation
714
+ command.request_object = set_iam_policy_request_object
715
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
716
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
717
+ command.params['resource'] = resource unless resource.nil?
718
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
719
+ command.query['fields'] = fields unless fields.nil?
720
+ execute_or_queue_command(command, &block)
721
+ end
722
+
723
+ # Returns the IAM access control policy for the specified Project.
724
+ # Permission is denied if the policy or the resource does not exist.
725
+ # @param [String] resource
726
+ # REQUIRED: The resource for which the policy is being requested.
727
+ # See the operation documentation for the appropriate value for this field.
728
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest] get_iam_policy_request_object
729
+ # @param [String] quota_user
730
+ # Available to use for quota purposes for server-side applications. Can be any
731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
732
+ # @param [String] fields
733
+ # Selector specifying which fields to include in a partial response.
734
+ # @param [Google::Apis::RequestOptions] options
735
+ # Request-specific options
736
+ #
737
+ # @yield [result, err] Result & error if block supplied
738
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Policy] parsed result object
739
+ # @yieldparam err [StandardError] error object if request failed
740
+ #
741
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Policy]
742
+ #
743
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
744
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
745
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
746
+ def get_project_iam_policy(resource, get_iam_policy_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
747
+ command = make_simple_command(:post, 'v1beta1/projects/{resource}:getIamPolicy', options)
606
748
  command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetIamPolicyRequest::Representation
607
749
  command.request_object = get_iam_policy_request_object
608
750
  command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Policy::Representation
609
751
  command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Policy
610
752
  command.params['resource'] = resource unless resource.nil?
753
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
611
754
  command.query['fields'] = fields unless fields.nil?
755
+ execute_or_queue_command(command, &block)
756
+ end
757
+
758
+ # Restores the Project identified by the specified
759
+ # `project_id` (for example, `my-project-123`).
760
+ # You can only use this method for a Project that has a lifecycle state of
761
+ # DELETE_REQUESTED.
762
+ # After deletion starts, the Project cannot be restored.
763
+ # The caller must have modify permissions for this Project.
764
+ # @param [String] project_id
765
+ # The project ID (for example, `foo-bar-123`).
766
+ # Required.
767
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest] undelete_project_request_object
768
+ # @param [String] quota_user
769
+ # Available to use for quota purposes for server-side applications. Can be any
770
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
771
+ # @param [String] fields
772
+ # Selector specifying which fields to include in a partial response.
773
+ # @param [Google::Apis::RequestOptions] options
774
+ # Request-specific options
775
+ #
776
+ # @yield [result, err] Result & error if block supplied
777
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
778
+ # @yieldparam err [StandardError] error object if request failed
779
+ #
780
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
781
+ #
782
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
783
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
784
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
785
+ def undelete_project(project_id, undelete_project_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
786
+ command = make_simple_command(:post, 'v1beta1/projects/{projectId}:undelete', options)
787
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::UndeleteProjectRequest::Representation
788
+ command.request_object = undelete_project_request_object
789
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
790
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
791
+ command.params['projectId'] = project_id unless project_id.nil?
612
792
  command.query['quotaUser'] = quota_user unless quota_user.nil?
793
+ command.query['fields'] = fields unless fields.nil?
613
794
  execute_or_queue_command(command, &block)
614
795
  end
615
796
 
616
- # Returns permissions that a caller has on the specified Organization.
617
- # @param [String] resource
618
- # REQUIRED: The resource for which the policy detail is being requested. `
619
- # resource` is usually specified as a path, such as `projects/*project*/zones/*
620
- # zone*/disks/*disk*`. The format for the path specified in this value is
621
- # resource specific and is specified in the `testIamPermissions` documentation.
622
- # @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
797
+ # Retrieves the Project identified by the specified
798
+ # `project_id` (for example, `my-project-123`).
799
+ # The caller must have read permissions for this Project.
800
+ # @param [String] project_id
801
+ # The Project ID (for example, `my-project-123`).
802
+ # Required.
803
+ # @param [String] quota_user
804
+ # Available to use for quota purposes for server-side applications. Can be any
805
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
623
806
  # @param [String] fields
624
807
  # Selector specifying which fields to include in a partial response.
808
+ # @param [Google::Apis::RequestOptions] options
809
+ # Request-specific options
810
+ #
811
+ # @yield [result, err] Result & error if block supplied
812
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
813
+ # @yieldparam err [StandardError] error object if request failed
814
+ #
815
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
816
+ #
817
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
818
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
819
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
820
+ def get_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
821
+ command = make_simple_command(:get, 'v1beta1/projects/{projectId}', options)
822
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
823
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
824
+ command.params['projectId'] = project_id unless project_id.nil?
825
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
826
+ command.query['fields'] = fields unless fields.nil?
827
+ execute_or_queue_command(command, &block)
828
+ end
829
+
830
+ # Gets a list of ancestors in the resource hierarchy for the Project
831
+ # identified by the specified `project_id` (for example, `my-project-123`).
832
+ # The caller must have read permissions for this Project.
833
+ # @param [String] project_id
834
+ # The Project ID (for example, `my-project-123`).
835
+ # Required.
836
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest] get_ancestry_request_object
625
837
  # @param [String] quota_user
626
838
  # Available to use for quota purposes for server-side applications. Can be any
627
839
  # arbitrary string assigned to a user, but should not exceed 40 characters.
840
+ # @param [String] fields
841
+ # Selector specifying which fields to include in a partial response.
842
+ # @param [Google::Apis::RequestOptions] options
843
+ # Request-specific options
844
+ #
845
+ # @yield [result, err] Result & error if block supplied
846
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse] parsed result object
847
+ # @yieldparam err [StandardError] error object if request failed
848
+ #
849
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse]
850
+ #
851
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
852
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
853
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
854
+ def get_project_ancestry(project_id, get_ancestry_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
855
+ command = make_simple_command(:post, 'v1beta1/projects/{projectId}:getAncestry', options)
856
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryRequest::Representation
857
+ command.request_object = get_ancestry_request_object
858
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse::Representation
859
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::GetAncestryResponse
860
+ command.params['projectId'] = project_id unless project_id.nil?
861
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
862
+ command.query['fields'] = fields unless fields.nil?
863
+ execute_or_queue_command(command, &block)
864
+ end
865
+
866
+ # Updates the attributes of the Project identified by the specified
867
+ # `project_id` (for example, `my-project-123`).
868
+ # The caller must have modify permissions for this Project.
869
+ # @param [String] project_id
870
+ # The project ID (for example, `my-project-123`).
871
+ # Required.
872
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::Project] project_object
873
+ # @param [String] quota_user
874
+ # Available to use for quota purposes for server-side applications. Can be any
875
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
876
+ # @param [String] fields
877
+ # Selector specifying which fields to include in a partial response.
878
+ # @param [Google::Apis::RequestOptions] options
879
+ # Request-specific options
880
+ #
881
+ # @yield [result, err] Result & error if block supplied
882
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Project] parsed result object
883
+ # @yieldparam err [StandardError] error object if request failed
884
+ #
885
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Project]
886
+ #
887
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
888
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
889
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
890
+ def update_project(project_id, project_object = nil, quota_user: nil, fields: nil, options: nil, &block)
891
+ command = make_simple_command(:put, 'v1beta1/projects/{projectId}', options)
892
+ command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
893
+ command.request_object = project_object
894
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Project::Representation
895
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Project
896
+ command.params['projectId'] = project_id unless project_id.nil?
897
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
898
+ command.query['fields'] = fields unless fields.nil?
899
+ execute_or_queue_command(command, &block)
900
+ end
901
+
902
+ # Returns permissions that a caller has on the specified Project.
903
+ # @param [String] resource
904
+ # REQUIRED: The resource for which the policy detail is being requested.
905
+ # See the operation documentation for the appropriate value for this field.
906
+ # @param [Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest] test_iam_permissions_request_object
907
+ # @param [String] quota_user
908
+ # Available to use for quota purposes for server-side applications. Can be any
909
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
910
+ # @param [String] fields
911
+ # Selector specifying which fields to include in a partial response.
628
912
  # @param [Google::Apis::RequestOptions] options
629
913
  # Request-specific options
630
914
  #
@@ -637,15 +921,123 @@ module Google
637
921
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
638
922
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
639
923
  # @raise [Google::Apis::AuthorizationError] Authorization is required
640
- def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
641
- command = make_simple_command(:post, 'v1beta1/organizations/{resource}:testIamPermissions', options)
924
+ def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
925
+ command = make_simple_command(:post, 'v1beta1/projects/{resource}:testIamPermissions', options)
642
926
  command.request_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsRequest::Representation
643
927
  command.request_object = test_iam_permissions_request_object
644
928
  command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse::Representation
645
929
  command.response_class = Google::Apis::CloudresourcemanagerV1beta1::TestIamPermissionsResponse
646
930
  command.params['resource'] = resource unless resource.nil?
931
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
932
+ command.query['fields'] = fields unless fields.nil?
933
+ execute_or_queue_command(command, &block)
934
+ end
935
+
936
+ # Marks the Project identified by the specified
937
+ # `project_id` (for example, `my-project-123`) for deletion.
938
+ # This method will only affect the Project if the following criteria are met:
939
+ # + The Project does not have a billing account associated with it.
940
+ # + The Project has a lifecycle state of
941
+ # ACTIVE.
942
+ # This method changes the Project's lifecycle state from
943
+ # ACTIVE
944
+ # to DELETE_REQUESTED.
945
+ # The deletion starts at an unspecified time, at which point the project is
946
+ # no longer accessible.
947
+ # Until the deletion completes, you can check the lifecycle state
948
+ # checked by retrieving the Project with GetProject,
949
+ # and the Project remains visible to ListProjects.
950
+ # However, you cannot update the project.
951
+ # After the deletion completes, the Project is not retrievable by
952
+ # the GetProject and
953
+ # ListProjects methods.
954
+ # The caller must have modify permissions for this Project.
955
+ # @param [String] project_id
956
+ # The Project ID (for example, `foo-bar-123`).
957
+ # Required.
958
+ # @param [String] quota_user
959
+ # Available to use for quota purposes for server-side applications. Can be any
960
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
961
+ # @param [String] fields
962
+ # Selector specifying which fields to include in a partial response.
963
+ # @param [Google::Apis::RequestOptions] options
964
+ # Request-specific options
965
+ #
966
+ # @yield [result, err] Result & error if block supplied
967
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::Empty] parsed result object
968
+ # @yieldparam err [StandardError] error object if request failed
969
+ #
970
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::Empty]
971
+ #
972
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
973
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
974
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
975
+ def delete_project(project_id, quota_user: nil, fields: nil, options: nil, &block)
976
+ command = make_simple_command(:delete, 'v1beta1/projects/{projectId}', options)
977
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::Empty::Representation
978
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::Empty
979
+ command.params['projectId'] = project_id unless project_id.nil?
980
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
647
981
  command.query['fields'] = fields unless fields.nil?
982
+ execute_or_queue_command(command, &block)
983
+ end
984
+
985
+ # Lists Projects that are visible to the user and satisfy the
986
+ # specified filter. This method returns Projects in an unspecified order.
987
+ # New Projects do not necessarily appear at the end of the list.
988
+ # @param [String] page_token
989
+ # A pagination token returned from a previous call to ListProjects
990
+ # that indicates from where listing should continue.
991
+ # Optional.
992
+ # @param [Fixnum] page_size
993
+ # The maximum number of Projects to return in the response.
994
+ # The server can return fewer Projects than requested.
995
+ # If unspecified, server picks an appropriate default.
996
+ # Optional.
997
+ # @param [String] filter
998
+ # An expression for filtering the results of the request. Filter rules are
999
+ # case insensitive. The fields eligible for filtering are:
1000
+ # + `name`
1001
+ # + `id`
1002
+ # + <code>labels.<em>key</em></code> where *key* is the name of a label
1003
+ # Some examples of using labels as filters:
1004
+ # |Filter|Description|
1005
+ # |------|-----------|
1006
+ # |name:*|The project has a name.|
1007
+ # |name:Howl|The project's name is `Howl` or `howl`.|
1008
+ # |name:HOWL|Equivalent to above.|
1009
+ # |NAME:howl|Equivalent to above.|
1010
+ # |labels.color:*|The project has the label `color`.|
1011
+ # |labels.color:red|The project's label `color` has the value `red`.|
1012
+ # |labels.color:red&nbsp;labels.size:big|The project's label `color` has the
1013
+ # value `red` and its label `size` has the value `big`.
1014
+ # Optional.
1015
+ # @param [String] quota_user
1016
+ # Available to use for quota purposes for server-side applications. Can be any
1017
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1018
+ # @param [String] fields
1019
+ # Selector specifying which fields to include in a partial response.
1020
+ # @param [Google::Apis::RequestOptions] options
1021
+ # Request-specific options
1022
+ #
1023
+ # @yield [result, err] Result & error if block supplied
1024
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse] parsed result object
1025
+ # @yieldparam err [StandardError] error object if request failed
1026
+ #
1027
+ # @return [Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse]
1028
+ #
1029
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1030
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1031
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1032
+ def list_projects(page_token: nil, page_size: nil, filter: nil, quota_user: nil, fields: nil, options: nil, &block)
1033
+ command = make_simple_command(:get, 'v1beta1/projects', options)
1034
+ command.response_representation = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse::Representation
1035
+ command.response_class = Google::Apis::CloudresourcemanagerV1beta1::ListProjectsResponse
1036
+ command.query['pageToken'] = page_token unless page_token.nil?
1037
+ command.query['pageSize'] = page_size unless page_size.nil?
1038
+ command.query['filter'] = filter unless filter.nil?
648
1039
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1040
+ command.query['fields'] = fields unless fields.nil?
649
1041
  execute_or_queue_command(command, &block)
650
1042
  end
651
1043