google-api-client 0.11.1 → 0.11.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/api_names.yaml +42335 -1
  4. data/generated/google/apis/acceleratedmobilepageurl_v1.rb +3 -3
  5. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +28 -28
  6. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +12 -12
  7. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +2 -2
  8. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  9. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +757 -757
  10. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +162 -162
  11. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +48 -48
  12. data/generated/google/apis/admin_directory_v1.rb +1 -1
  13. data/generated/google/apis/admin_directory_v1/classes.rb +75 -7
  14. data/generated/google/apis/admin_directory_v1/representations.rb +20 -0
  15. data/generated/google/apis/admin_directory_v1/service.rb +61 -61
  16. data/generated/google/apis/adsense_v1_4.rb +1 -1
  17. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  18. data/generated/google/apis/analyticsreporting_v4.rb +1 -1
  19. data/generated/google/apis/analyticsreporting_v4/classes.rb +403 -403
  20. data/generated/google/apis/analyticsreporting_v4/representations.rb +108 -108
  21. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  22. data/generated/google/apis/androidenterprise_v1/classes.rb +36 -11
  23. data/generated/google/apis/androidenterprise_v1/representations.rb +2 -0
  24. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  25. data/generated/google/apis/appengine_v1.rb +6 -5
  26. data/generated/google/apis/appengine_v1/classes.rb +1429 -1421
  27. data/generated/google/apis/appengine_v1/representations.rb +331 -331
  28. data/generated/google/apis/appengine_v1/service.rb +173 -168
  29. data/generated/google/apis/appstate_v1.rb +1 -1
  30. data/generated/google/apis/bigquery_v2.rb +1 -1
  31. data/generated/google/apis/calendar_v3.rb +1 -1
  32. data/generated/google/apis/classroom_v1.rb +1 -1
  33. data/generated/google/apis/cloudbilling_v1.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudbuild_v1/classes.rb +624 -618
  36. data/generated/google/apis/cloudbuild_v1/representations.rb +126 -125
  37. data/generated/google/apis/cloudbuild_v1/service.rb +87 -87
  38. data/generated/google/apis/clouddebugger_v2.rb +4 -4
  39. data/generated/google/apis/clouddebugger_v2/classes.rb +267 -267
  40. data/generated/google/apis/clouddebugger_v2/representations.rb +83 -83
  41. data/generated/google/apis/clouddebugger_v2/service.rb +137 -137
  42. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  43. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +131 -131
  44. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +28 -28
  45. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +17 -17
  46. data/generated/google/apis/cloudfunctions_v1.rb +1 -4
  47. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -47
  48. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -17
  49. data/generated/google/apis/cloudfunctions_v1/service.rb +0 -30
  50. data/generated/google/apis/cloudkms_v1.rb +1 -1
  51. data/generated/google/apis/cloudkms_v1/classes.rb +625 -625
  52. data/generated/google/apis/cloudkms_v1/representations.rb +132 -132
  53. data/generated/google/apis/cloudkms_v1/service.rb +272 -272
  54. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  55. data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
  56. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +242 -242
  57. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +43 -43
  58. data/generated/google/apis/cloudresourcemanager_v1/service.rb +505 -505
  59. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +4 -4
  60. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +172 -172
  61. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +39 -39
  62. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +310 -310
  63. data/generated/google/apis/cloudtrace_v1.rb +1 -1
  64. data/generated/google/apis/cloudtrace_v1/classes.rb +96 -69
  65. data/generated/google/apis/cloudtrace_v1/representations.rb +16 -16
  66. data/generated/google/apis/cloudtrace_v1/service.rb +42 -15
  67. data/generated/google/apis/compute_beta.rb +1 -1
  68. data/generated/google/apis/compute_beta/classes.rb +194 -25
  69. data/generated/google/apis/compute_beta/representations.rb +42 -0
  70. data/generated/google/apis/compute_beta/service.rb +196 -100
  71. data/generated/google/apis/compute_v1.rb +1 -1
  72. data/generated/google/apis/compute_v1/classes.rb +69 -18
  73. data/generated/google/apis/compute_v1/representations.rb +16 -0
  74. data/generated/google/apis/compute_v1/service.rb +84 -26
  75. data/generated/google/apis/container_v1.rb +3 -3
  76. data/generated/google/apis/container_v1/classes.rb +794 -586
  77. data/generated/google/apis/container_v1/representations.rb +202 -118
  78. data/generated/google/apis/container_v1/service.rb +396 -167
  79. data/generated/google/apis/content_v2.rb +1 -1
  80. data/generated/google/apis/content_v2/service.rb +4 -4
  81. data/generated/google/apis/dataproc_v1.rb +1 -1
  82. data/generated/google/apis/dataproc_v1/classes.rb +487 -484
  83. data/generated/google/apis/dataproc_v1/representations.rb +83 -83
  84. data/generated/google/apis/dataproc_v1/service.rb +299 -297
  85. data/generated/google/apis/datastore_v1.rb +1 -1
  86. data/generated/google/apis/datastore_v1/classes.rb +703 -703
  87. data/generated/google/apis/datastore_v1/representations.rb +148 -148
  88. data/generated/google/apis/datastore_v1/service.rb +62 -62
  89. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  90. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -5
  91. data/generated/google/apis/dfareporting_v2_6.rb +1 -1
  92. data/generated/google/apis/dfareporting_v2_6/classes.rb +66 -53
  93. data/generated/google/apis/dfareporting_v2_6/service.rb +30 -30
  94. data/generated/google/apis/dfareporting_v2_7.rb +1 -1
  95. data/generated/google/apis/dfareporting_v2_7/classes.rb +69 -55
  96. data/generated/google/apis/dfareporting_v2_7/service.rb +38 -37
  97. data/generated/google/apis/dfareporting_v2_8.rb +40 -0
  98. data/generated/google/apis/dfareporting_v2_8/classes.rb +12046 -0
  99. data/generated/google/apis/dfareporting_v2_8/representations.rb +4310 -0
  100. data/generated/google/apis/dfareporting_v2_8/service.rb +9135 -0
  101. data/generated/google/apis/dns_v1.rb +1 -1
  102. data/generated/google/apis/dns_v2beta1.rb +1 -1
  103. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  104. data/generated/google/apis/drive_v2.rb +1 -1
  105. data/generated/google/apis/drive_v2/classes.rb +15 -0
  106. data/generated/google/apis/drive_v2/representations.rb +2 -0
  107. data/generated/google/apis/drive_v2/service.rb +2 -1
  108. data/generated/google/apis/drive_v3.rb +1 -1
  109. data/generated/google/apis/drive_v3/classes.rb +16 -0
  110. data/generated/google/apis/drive_v3/representations.rb +2 -0
  111. data/generated/google/apis/drive_v3/service.rb +2 -1
  112. data/generated/google/apis/firebasedynamiclinks_v1.rb +2 -3
  113. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +159 -159
  114. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +55 -55
  115. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +5 -6
  116. data/generated/google/apis/firebaserules_v1.rb +1 -1
  117. data/generated/google/apis/firebaserules_v1/classes.rb +73 -73
  118. data/generated/google/apis/firebaserules_v1/representations.rb +25 -25
  119. data/generated/google/apis/firebaserules_v1/service.rb +118 -118
  120. data/generated/google/apis/fusiontables_v2.rb +1 -1
  121. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  122. data/generated/google/apis/games_management_v1management.rb +1 -1
  123. data/generated/google/apis/games_v1.rb +1 -1
  124. data/generated/google/apis/genomics_v1.rb +1 -1
  125. data/generated/google/apis/genomics_v1/classes.rb +920 -920
  126. data/generated/google/apis/genomics_v1/representations.rb +202 -202
  127. data/generated/google/apis/genomics_v1/service.rb +1092 -1092
  128. data/generated/google/apis/gmail_v1.rb +1 -1
  129. data/generated/google/apis/iam_v1.rb +1 -1
  130. data/generated/google/apis/iam_v1/classes.rb +455 -435
  131. data/generated/google/apis/iam_v1/representations.rb +96 -93
  132. data/generated/google/apis/iam_v1/service.rb +157 -157
  133. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  134. data/generated/google/apis/identitytoolkit_v3/classes.rb +12 -0
  135. data/generated/google/apis/identitytoolkit_v3/representations.rb +2 -0
  136. data/generated/google/apis/kgsearch_v1/classes.rb +6 -6
  137. data/generated/google/apis/kgsearch_v1/representations.rb +1 -1
  138. data/generated/google/apis/kgsearch_v1/service.rb +9 -9
  139. data/generated/google/apis/language_v1.rb +1 -1
  140. data/generated/google/apis/language_v1/classes.rb +455 -455
  141. data/generated/google/apis/language_v1/representations.rb +102 -102
  142. data/generated/google/apis/language_v1/service.rb +42 -42
  143. data/generated/google/apis/language_v1beta1.rb +1 -1
  144. data/generated/google/apis/language_v1beta1/classes.rb +216 -215
  145. data/generated/google/apis/language_v1beta1/representations.rb +75 -75
  146. data/generated/google/apis/language_v1beta1/service.rb +45 -45
  147. data/generated/google/apis/logging_v2.rb +1 -1
  148. data/generated/google/apis/logging_v2/classes.rb +908 -895
  149. data/generated/google/apis/logging_v2/representations.rb +121 -120
  150. data/generated/google/apis/logging_v2/service.rb +489 -489
  151. data/generated/google/apis/logging_v2beta1.rb +4 -4
  152. data/generated/google/apis/logging_v2beta1/classes.rb +928 -915
  153. data/generated/google/apis/logging_v2beta1/representations.rb +121 -120
  154. data/generated/google/apis/logging_v2beta1/service.rb +249 -249
  155. data/generated/google/apis/manufacturers_v1.rb +1 -1
  156. data/generated/google/apis/manufacturers_v1/classes.rb +294 -294
  157. data/generated/google/apis/manufacturers_v1/representations.rb +84 -84
  158. data/generated/google/apis/manufacturers_v1/service.rb +8 -8
  159. data/generated/google/apis/mirror_v1.rb +1 -1
  160. data/generated/google/apis/ml_v1.rb +1 -1
  161. data/generated/google/apis/ml_v1/classes.rb +1186 -1183
  162. data/generated/google/apis/ml_v1/representations.rb +177 -177
  163. data/generated/google/apis/ml_v1/service.rb +244 -244
  164. data/generated/google/apis/monitoring_v3.rb +1 -1
  165. data/generated/google/apis/monitoring_v3/classes.rb +866 -866
  166. data/generated/google/apis/monitoring_v3/representations.rb +163 -163
  167. data/generated/google/apis/monitoring_v3/service.rb +355 -316
  168. data/generated/google/apis/oauth2_v2.rb +1 -1
  169. data/generated/google/apis/partners_v2.rb +1 -1
  170. data/generated/google/apis/partners_v2/classes.rb +1499 -1499
  171. data/generated/google/apis/partners_v2/representations.rb +368 -368
  172. data/generated/google/apis/partners_v2/service.rb +512 -512
  173. data/generated/google/apis/people_v1.rb +10 -10
  174. data/generated/google/apis/people_v1/classes.rb +544 -423
  175. data/generated/google/apis/people_v1/representations.rb +127 -109
  176. data/generated/google/apis/people_v1/service.rb +8 -8
  177. data/generated/google/apis/plus_domains_v1.rb +1 -1
  178. data/generated/google/apis/plus_v1.rb +1 -1
  179. data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
  180. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +200 -200
  181. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +41 -41
  182. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +80 -80
  183. data/generated/google/apis/pubsub_v1.rb +1 -1
  184. data/generated/google/apis/pubsub_v1/classes.rb +377 -377
  185. data/generated/google/apis/pubsub_v1/representations.rb +82 -82
  186. data/generated/google/apis/pubsub_v1/service.rb +93 -93
  187. data/generated/google/apis/runtimeconfig_v1.rb +6 -4
  188. data/generated/google/apis/runtimeconfig_v1/classes.rb +22 -22
  189. data/generated/google/apis/runtimeconfig_v1/representations.rb +2 -2
  190. data/generated/google/apis/runtimeconfig_v1/service.rb +57 -55
  191. data/generated/google/apis/script_v1.rb +14 -14
  192. data/generated/google/apis/script_v1/classes.rb +113 -58
  193. data/generated/google/apis/script_v1/representations.rb +43 -14
  194. data/generated/google/apis/script_v1/service.rb +6 -6
  195. data/generated/google/apis/searchconsole_v1.rb +1 -1
  196. data/generated/google/apis/searchconsole_v1/classes.rb +67 -67
  197. data/generated/google/apis/searchconsole_v1/representations.rb +29 -29
  198. data/generated/google/apis/searchconsole_v1/service.rb +6 -6
  199. data/generated/google/apis/servicecontrol_v1.rb +4 -4
  200. data/generated/google/apis/servicecontrol_v1/classes.rb +1125 -1125
  201. data/generated/google/apis/servicecontrol_v1/representations.rb +213 -213
  202. data/generated/google/apis/servicecontrol_v1/service.rb +92 -92
  203. data/generated/google/apis/servicemanagement_v1.rb +1 -1
  204. data/generated/google/apis/servicemanagement_v1/classes.rb +3364 -3622
  205. data/generated/google/apis/servicemanagement_v1/representations.rb +546 -530
  206. data/generated/google/apis/servicemanagement_v1/service.rb +262 -152
  207. data/generated/google/apis/serviceuser_v1.rb +4 -4
  208. data/generated/google/apis/serviceuser_v1/classes.rb +2616 -2874
  209. data/generated/google/apis/serviceuser_v1/representations.rb +294 -278
  210. data/generated/google/apis/serviceuser_v1/service.rb +19 -19
  211. data/generated/google/apis/sheets_v4.rb +4 -1
  212. data/generated/google/apis/sheets_v4/classes.rb +4315 -4313
  213. data/generated/google/apis/sheets_v4/representations.rb +858 -858
  214. data/generated/google/apis/sheets_v4/service.rb +115 -115
  215. data/generated/google/apis/slides_v1.rb +1 -1
  216. data/generated/google/apis/slides_v1/classes.rb +2890 -2890
  217. data/generated/google/apis/slides_v1/representations.rb +638 -638
  218. data/generated/google/apis/slides_v1/service.rb +36 -36
  219. data/generated/google/apis/sourcerepo_v1.rb +1 -1
  220. data/generated/google/apis/sourcerepo_v1/classes.rb +283 -283
  221. data/generated/google/apis/sourcerepo_v1/representations.rb +67 -67
  222. data/generated/google/apis/sourcerepo_v1/service.rb +88 -88
  223. data/generated/google/apis/spanner_v1.rb +1 -1
  224. data/generated/google/apis/spanner_v1/classes.rb +2258 -2233
  225. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  226. data/generated/google/apis/spanner_v1/service.rb +466 -466
  227. data/generated/google/apis/speech_v1beta1.rb +2 -2
  228. data/generated/google/apis/speech_v1beta1/classes.rb +97 -97
  229. data/generated/google/apis/speech_v1beta1/representations.rb +29 -29
  230. data/generated/google/apis/speech_v1beta1/service.rb +49 -49
  231. data/generated/google/apis/storage_v1.rb +1 -1
  232. data/generated/google/apis/storagetransfer_v1.rb +1 -1
  233. data/generated/google/apis/storagetransfer_v1/classes.rb +786 -786
  234. data/generated/google/apis/storagetransfer_v1/representations.rb +133 -133
  235. data/generated/google/apis/storagetransfer_v1/service.rb +30 -30
  236. data/generated/google/apis/surveys_v2.rb +1 -1
  237. data/generated/google/apis/surveys_v2/classes.rb +0 -12
  238. data/generated/google/apis/surveys_v2/representations.rb +0 -4
  239. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  240. data/generated/google/apis/vision_v1.rb +1 -1
  241. data/generated/google/apis/vision_v1/classes.rb +1301 -1302
  242. data/generated/google/apis/vision_v1/representations.rb +183 -183
  243. data/generated/google/apis/youtube_analytics_v1.rb +1 -1
  244. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  245. data/generated/google/apis/youtube_partner_v1/classes.rb +10 -0
  246. data/generated/google/apis/youtube_partner_v1/representations.rb +1 -0
  247. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  248. data/generated/google/apis/youtubereporting_v1/classes.rb +64 -64
  249. data/generated/google/apis/youtubereporting_v1/representations.rb +12 -12
  250. data/generated/google/apis/youtubereporting_v1/service.rb +94 -94
  251. data/lib/google/apis/version.rb +1 -1
  252. metadata +7 -3
@@ -28,13 +28,13 @@ module Google
28
28
  include Google::Apis::Core::JsonObjectSupport
29
29
  end
30
30
 
31
- class ListLiensResponse
31
+ class Status
32
32
  class Representation < Google::Apis::Core::JsonRepresentation; end
33
33
 
34
34
  include Google::Apis::Core::JsonObjectSupport
35
35
  end
36
36
 
37
- class Status
37
+ class ListLiensResponse
38
38
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
39
 
40
40
  include Google::Apis::Core::JsonObjectSupport
@@ -46,13 +46,13 @@ module Google
46
46
  include Google::Apis::Core::JsonObjectSupport
47
47
  end
48
48
 
49
- class RestoreDefault
49
+ class GetOrgPolicyRequest
50
50
  class Representation < Google::Apis::Core::JsonRepresentation; end
51
51
 
52
52
  include Google::Apis::Core::JsonObjectSupport
53
53
  end
54
54
 
55
- class GetOrgPolicyRequest
55
+ class RestoreDefault
56
56
  class Representation < Google::Apis::Core::JsonRepresentation; end
57
57
 
58
58
  include Google::Apis::Core::JsonObjectSupport
@@ -130,13 +130,13 @@ module Google
130
130
  include Google::Apis::Core::JsonObjectSupport
131
131
  end
132
132
 
133
- class BooleanPolicy
133
+ class OrgPolicy
134
134
  class Representation < Google::Apis::Core::JsonRepresentation; end
135
135
 
136
136
  include Google::Apis::Core::JsonObjectSupport
137
137
  end
138
138
 
139
- class OrgPolicy
139
+ class BooleanPolicy
140
140
  class Representation < Google::Apis::Core::JsonRepresentation; end
141
141
 
142
142
  include Google::Apis::Core::JsonObjectSupport
@@ -262,13 +262,13 @@ module Google
262
262
  include Google::Apis::Core::JsonObjectSupport
263
263
  end
264
264
 
265
- class AuditConfig
265
+ class Operation
266
266
  class Representation < Google::Apis::Core::JsonRepresentation; end
267
267
 
268
268
  include Google::Apis::Core::JsonObjectSupport
269
269
  end
270
270
 
271
- class Operation
271
+ class AuditConfig
272
272
  class Representation < Google::Apis::Core::JsonRepresentation; end
273
273
 
274
274
  include Google::Apis::Core::JsonObjectSupport
@@ -277,23 +277,14 @@ module Google
277
277
  class Constraint
278
278
  # @private
279
279
  class Representation < Google::Apis::Core::JsonRepresentation
280
- property :list_constraint, as: 'listConstraint', class: Google::Apis::CloudresourcemanagerV1::ListConstraint, decorator: Google::Apis::CloudresourcemanagerV1::ListConstraint::Representation
281
-
282
- property :version, as: 'version'
283
280
  property :description, as: 'description'
284
281
  property :display_name, as: 'displayName'
285
282
  property :boolean_constraint, as: 'booleanConstraint', class: Google::Apis::CloudresourcemanagerV1::BooleanConstraint, decorator: Google::Apis::CloudresourcemanagerV1::BooleanConstraint::Representation
286
283
 
287
284
  property :constraint_default, as: 'constraintDefault'
288
285
  property :name, as: 'name'
289
- end
290
- end
291
-
292
- class ListLiensResponse
293
- # @private
294
- class Representation < Google::Apis::Core::JsonRepresentation
295
- property :next_page_token, as: 'nextPageToken'
296
- collection :liens, as: 'liens', class: Google::Apis::CloudresourcemanagerV1::Lien, decorator: Google::Apis::CloudresourcemanagerV1::Lien::Representation
286
+ property :version, as: 'version'
287
+ property :list_constraint, as: 'listConstraint', class: Google::Apis::CloudresourcemanagerV1::ListConstraint, decorator: Google::Apis::CloudresourcemanagerV1::ListConstraint::Representation
297
288
 
298
289
  end
299
290
  end
@@ -307,6 +298,15 @@ module Google
307
298
  end
308
299
  end
309
300
 
301
+ class ListLiensResponse
302
+ # @private
303
+ class Representation < Google::Apis::Core::JsonRepresentation
304
+ property :next_page_token, as: 'nextPageToken'
305
+ collection :liens, as: 'liens', class: Google::Apis::CloudresourcemanagerV1::Lien, decorator: Google::Apis::CloudresourcemanagerV1::Lien::Representation
306
+
307
+ end
308
+ end
309
+
310
310
  class Binding
311
311
  # @private
312
312
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -315,16 +315,16 @@ module Google
315
315
  end
316
316
  end
317
317
 
318
- class RestoreDefault
318
+ class GetOrgPolicyRequest
319
319
  # @private
320
320
  class Representation < Google::Apis::Core::JsonRepresentation
321
+ property :constraint, as: 'constraint'
321
322
  end
322
323
  end
323
324
 
324
- class GetOrgPolicyRequest
325
+ class RestoreDefault
325
326
  # @private
326
327
  class Representation < Google::Apis::Core::JsonRepresentation
327
- property :constraint, as: 'constraint'
328
328
  end
329
329
  end
330
330
 
@@ -393,8 +393,8 @@ module Google
393
393
  property :project_number, :numeric_string => true, as: 'projectNumber'
394
394
  property :parent, as: 'parent', class: Google::Apis::CloudresourcemanagerV1::ResourceId, decorator: Google::Apis::CloudresourcemanagerV1::ResourceId::Representation
395
395
 
396
- property :create_time, as: 'createTime'
397
396
  hash :labels, as: 'labels'
397
+ property :create_time, as: 'createTime'
398
398
  property :name, as: 'name'
399
399
  property :project_id, as: 'projectId'
400
400
  end
@@ -425,26 +425,26 @@ module Google
425
425
  end
426
426
  end
427
427
 
428
- class BooleanPolicy
429
- # @private
430
- class Representation < Google::Apis::Core::JsonRepresentation
431
- property :enforced, as: 'enforced'
432
- end
433
- end
434
-
435
428
  class OrgPolicy
436
429
  # @private
437
430
  class Representation < Google::Apis::Core::JsonRepresentation
431
+ property :version, as: 'version'
432
+ property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudresourcemanagerV1::RestoreDefault, decorator: Google::Apis::CloudresourcemanagerV1::RestoreDefault::Representation
433
+
438
434
  property :list_policy, as: 'listPolicy', class: Google::Apis::CloudresourcemanagerV1::ListPolicy, decorator: Google::Apis::CloudresourcemanagerV1::ListPolicy::Representation
439
435
 
440
436
  property :etag, :base64 => true, as: 'etag'
437
+ property :constraint, as: 'constraint'
441
438
  property :boolean_policy, as: 'booleanPolicy', class: Google::Apis::CloudresourcemanagerV1::BooleanPolicy, decorator: Google::Apis::CloudresourcemanagerV1::BooleanPolicy::Representation
442
439
 
443
- property :constraint, as: 'constraint'
444
440
  property :update_time, as: 'updateTime'
445
- property :version, as: 'version'
446
- property :restore_default, as: 'restoreDefault', class: Google::Apis::CloudresourcemanagerV1::RestoreDefault, decorator: Google::Apis::CloudresourcemanagerV1::RestoreDefault::Representation
441
+ end
442
+ end
447
443
 
444
+ class BooleanPolicy
445
+ # @private
446
+ class Representation < Google::Apis::Core::JsonRepresentation
447
+ property :enforced, as: 'enforced'
448
448
  end
449
449
  end
450
450
 
@@ -601,8 +601,8 @@ module Google
601
601
  class ResourceId
602
602
  # @private
603
603
  class Representation < Google::Apis::Core::JsonRepresentation
604
- property :id, as: 'id'
605
604
  property :type, as: 'type'
605
+ property :id, as: 'id'
606
606
  end
607
607
  end
608
608
 
@@ -621,24 +621,24 @@ module Google
621
621
  end
622
622
  end
623
623
 
624
- class AuditConfig
624
+ class Operation
625
625
  # @private
626
626
  class Representation < Google::Apis::Core::JsonRepresentation
627
- property :service, as: 'service'
628
- collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudresourcemanagerV1::AuditLogConfig, decorator: Google::Apis::CloudresourcemanagerV1::AuditLogConfig::Representation
627
+ hash :response, as: 'response'
628
+ property :name, as: 'name'
629
+ property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation
629
630
 
631
+ hash :metadata, as: 'metadata'
632
+ property :done, as: 'done'
630
633
  end
631
634
  end
632
635
 
633
- class Operation
636
+ class AuditConfig
634
637
  # @private
635
638
  class Representation < Google::Apis::Core::JsonRepresentation
636
- property :done, as: 'done'
637
- hash :response, as: 'response'
638
- property :name, as: 'name'
639
- property :error, as: 'error', class: Google::Apis::CloudresourcemanagerV1::Status, decorator: Google::Apis::CloudresourcemanagerV1::Status::Representation
639
+ property :service, as: 'service'
640
+ collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::CloudresourcemanagerV1::AuditLogConfig, decorator: Google::Apis::CloudresourcemanagerV1::AuditLogConfig::Representation
640
641
 
641
- hash :metadata, as: 'metadata'
642
642
  end
643
643
  end
644
644
  end
@@ -48,10 +48,10 @@ module Google
48
48
  @batch_path = 'batch'
49
49
  end
50
50
 
51
- # Lists all the `Policies` set for a particular resource.
51
+ # Clears a `Policy` from a resource.
52
52
  # @param [String] resource
53
- # Name of the resource to list Policies for.
54
- # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
53
+ # Name of the resource for the `Policy` to clear.
54
+ # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
55
55
  # @param [String] fields
56
56
  # Selector specifying which fields to include in a partial response.
57
57
  # @param [String] quota_user
@@ -61,20 +61,56 @@ module Google
61
61
  # Request-specific options
62
62
  #
63
63
  # @yield [result, err] Result & error if block supplied
64
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
64
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
65
65
  # @yieldparam err [StandardError] error object if request failed
66
66
  #
67
- # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
67
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
68
68
  #
69
69
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
70
70
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
71
71
  # @raise [Google::Apis::AuthorizationError] Authorization is required
72
- def list_organization_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
73
- command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
74
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
75
- command.request_object = list_org_policies_request_object
76
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
77
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
72
+ def clear_folder_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
73
+ command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
74
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
75
+ command.request_object = clear_org_policy_request_object
76
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
77
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
78
+ command.params['resource'] = resource unless resource.nil?
79
+ command.query['fields'] = fields unless fields.nil?
80
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
81
+ execute_or_queue_command(command, &block)
82
+ end
83
+
84
+ # Updates the specified `Policy` on the resource. Creates a new `Policy` for
85
+ # that `Constraint` on the resource if one does not exist.
86
+ # Not supplying an `etag` on the request `Policy` results in an unconditional
87
+ # write of the `Policy`.
88
+ # @param [String] resource
89
+ # Resource name of the resource to attach the `Policy`.
90
+ # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
91
+ # @param [String] fields
92
+ # Selector specifying which fields to include in a partial response.
93
+ # @param [String] quota_user
94
+ # Available to use for quota purposes for server-side applications. Can be any
95
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
96
+ # @param [Google::Apis::RequestOptions] options
97
+ # Request-specific options
98
+ #
99
+ # @yield [result, err] Result & error if block supplied
100
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
101
+ # @yieldparam err [StandardError] error object if request failed
102
+ #
103
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
104
+ #
105
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
106
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
107
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
108
+ def set_folder_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
109
+ command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
110
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
111
+ command.request_object = set_org_policy_request_object
112
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
113
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
78
114
  command.params['resource'] = resource unless resource.nil?
79
115
  command.query['fields'] = fields unless fields.nil?
80
116
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -102,7 +138,7 @@ module Google
102
138
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
103
139
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
104
140
  # @raise [Google::Apis::AuthorizationError] Authorization is required
105
- def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
141
+ def list_folder_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
106
142
  command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
107
143
  command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
108
144
  command.request_object = list_available_org_policy_constraints_request_object
@@ -114,13 +150,10 @@ module Google
114
150
  execute_or_queue_command(command, &block)
115
151
  end
116
152
 
117
- # Gets the access control policy for an Organization resource. May be empty
118
- # if no such policy or resource exists. The `resource` field should be the
119
- # organization's resource name, e.g. "organizations/123".
153
+ # Lists all the `Policies` set for a particular resource.
120
154
  # @param [String] resource
121
- # REQUIRED: The resource for which the policy is being requested.
122
- # See the operation documentation for the appropriate value for this field.
123
- # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
155
+ # Name of the resource to list Policies for.
156
+ # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
124
157
  # @param [String] fields
125
158
  # Selector specifying which fields to include in a partial response.
126
159
  # @param [String] quota_user
@@ -130,20 +163,20 @@ module Google
130
163
  # Request-specific options
131
164
  #
132
165
  # @yield [result, err] Result & error if block supplied
133
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
166
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
134
167
  # @yieldparam err [StandardError] error object if request failed
135
168
  #
136
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
169
+ # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
137
170
  #
138
171
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
139
172
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
140
173
  # @raise [Google::Apis::AuthorizationError] Authorization is required
141
- def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
142
- command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
143
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
144
- command.request_object = get_iam_policy_request_object
145
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
146
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
174
+ def list_folder_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
175
+ command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
176
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
177
+ command.request_object = list_org_policies_request_object
178
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
179
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
147
180
  command.params['resource'] = resource unless resource.nil?
148
181
  command.query['fields'] = fields unless fields.nil?
149
182
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -175,7 +208,7 @@ module Google
175
208
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
176
209
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
177
210
  # @raise [Google::Apis::AuthorizationError] Authorization is required
178
- def get_organization_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
211
+ def get_folder_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
179
212
  command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
180
213
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
181
214
  command.request_object = get_org_policy_request_object
@@ -187,39 +220,6 @@ module Google
187
220
  execute_or_queue_command(command, &block)
188
221
  end
189
222
 
190
- # Searches Organization resources that are visible to the user and satisfy
191
- # the specified filter. This method returns Organizations in an unspecified
192
- # order. New Organizations do not necessarily appear at the end of the
193
- # results.
194
- # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object
195
- # @param [String] fields
196
- # Selector specifying which fields to include in a partial response.
197
- # @param [String] quota_user
198
- # Available to use for quota purposes for server-side applications. Can be any
199
- # arbitrary string assigned to a user, but should not exceed 40 characters.
200
- # @param [Google::Apis::RequestOptions] options
201
- # Request-specific options
202
- #
203
- # @yield [result, err] Result & error if block supplied
204
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
205
- # @yieldparam err [StandardError] error object if request failed
206
- #
207
- # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
208
- #
209
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
210
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
211
- # @raise [Google::Apis::AuthorizationError] Authorization is required
212
- def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
213
- command = make_simple_command(:post, 'v1/organizations:search', options)
214
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
215
- command.request_object = search_organizations_request_object
216
- command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
217
- command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
218
- command.query['fields'] = fields unless fields.nil?
219
- command.query['quotaUser'] = quota_user unless quota_user.nil?
220
- execute_or_queue_command(command, &block)
221
- end
222
-
223
223
  # Gets the effective `Policy` on a resource. This is the result of merging
224
224
  # `Policies` in the resource hierarchy. The returned `Policy` will not have
225
225
  # an `etag`set because it is a computed `Policy` across multiple resources.
@@ -243,7 +243,7 @@ module Google
243
243
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
244
244
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
245
245
  # @raise [Google::Apis::AuthorizationError] Authorization is required
246
- def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
246
+ def get_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
247
247
  command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
248
248
  command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
249
249
  command.request_object = get_effective_org_policy_request_object
@@ -255,9 +255,10 @@ module Google
255
255
  execute_or_queue_command(command, &block)
256
256
  end
257
257
 
258
- # Fetches an Organization resource identified by the specified resource name.
259
- # @param [String] name
260
- # The resource name of the Organization to fetch, e.g. "organizations/1234".
258
+ # Lists `Constraints` that could be applied on the specified resource.
259
+ # @param [String] resource
260
+ # Name of the resource to list `Constraints` for.
261
+ # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
261
262
  # @param [String] fields
262
263
  # Selector specifying which fields to include in a partial response.
263
264
  # @param [String] quota_user
@@ -267,31 +268,32 @@ module Google
267
268
  # Request-specific options
268
269
  #
269
270
  # @yield [result, err] Result & error if block supplied
270
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object
271
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
271
272
  # @yieldparam err [StandardError] error object if request failed
272
273
  #
273
- # @return [Google::Apis::CloudresourcemanagerV1::Organization]
274
+ # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
274
275
  #
275
276
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
276
277
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
277
278
  # @raise [Google::Apis::AuthorizationError] Authorization is required
278
- def get_organization(name, fields: nil, quota_user: nil, options: nil, &block)
279
- command = make_simple_command(:get, 'v1/{+name}', options)
280
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
281
- command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
282
- command.params['name'] = name unless name.nil?
279
+ def list_project_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
280
+ command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
281
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
282
+ command.request_object = list_available_org_policy_constraints_request_object
283
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
284
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
285
+ command.params['resource'] = resource unless resource.nil?
283
286
  command.query['fields'] = fields unless fields.nil?
284
287
  command.query['quotaUser'] = quota_user unless quota_user.nil?
285
288
  execute_or_queue_command(command, &block)
286
289
  end
287
290
 
288
- # Returns permissions that a caller has on the specified Organization.
289
- # The `resource` field should be the organization's resource name,
290
- # e.g. "organizations/123".
291
+ # Returns the IAM access control policy for the specified Project.
292
+ # Permission is denied if the policy or the resource does not exist.
291
293
  # @param [String] resource
292
- # REQUIRED: The resource for which the policy detail is being requested.
294
+ # REQUIRED: The resource for which the policy is being requested.
293
295
  # See the operation documentation for the appropriate value for this field.
294
- # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
296
+ # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
295
297
  # @param [String] fields
296
298
  # Selector specifying which fields to include in a partial response.
297
299
  # @param [String] quota_user
@@ -301,30 +303,34 @@ module Google
301
303
  # Request-specific options
302
304
  #
303
305
  # @yield [result, err] Result & error if block supplied
304
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
306
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
305
307
  # @yieldparam err [StandardError] error object if request failed
306
308
  #
307
- # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
309
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
308
310
  #
309
311
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
310
312
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
311
313
  # @raise [Google::Apis::AuthorizationError] Authorization is required
312
- def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
313
- command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
314
- command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
315
- command.request_object = test_iam_permissions_request_object
316
- command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
317
- command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
314
+ def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
315
+ command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
316
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
317
+ command.request_object = get_iam_policy_request_object
318
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
319
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
318
320
  command.params['resource'] = resource unless resource.nil?
319
321
  command.query['fields'] = fields unless fields.nil?
320
322
  command.query['quotaUser'] = quota_user unless quota_user.nil?
321
323
  execute_or_queue_command(command, &block)
322
324
  end
323
325
 
324
- # Clears a `Policy` from a resource.
326
+ # Gets a `Policy` on a resource.
327
+ # If no `Policy` is set on the resource, a `Policy` is returned with default
328
+ # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
329
+ # `etag` value can be used with `SetOrgPolicy()` to create or update a
330
+ # `Policy` during read-modify-write.
325
331
  # @param [String] resource
326
- # Name of the resource for the `Policy` to clear.
327
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
332
+ # Name of the resource the `Policy` is set on.
333
+ # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
328
334
  # @param [String] fields
329
335
  # Selector specifying which fields to include in a partial response.
330
336
  # @param [String] quota_user
@@ -334,33 +340,32 @@ module Google
334
340
  # Request-specific options
335
341
  #
336
342
  # @yield [result, err] Result & error if block supplied
337
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
343
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
338
344
  # @yieldparam err [StandardError] error object if request failed
339
345
  #
340
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
346
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
341
347
  #
342
348
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
343
349
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
344
350
  # @raise [Google::Apis::AuthorizationError] Authorization is required
345
- def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
346
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
347
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
348
- command.request_object = clear_org_policy_request_object
349
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
350
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
351
+ def get_project_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
352
+ command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
353
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
354
+ command.request_object = get_org_policy_request_object
355
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
356
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
351
357
  command.params['resource'] = resource unless resource.nil?
352
358
  command.query['fields'] = fields unless fields.nil?
353
359
  command.query['quotaUser'] = quota_user unless quota_user.nil?
354
360
  execute_or_queue_command(command, &block)
355
361
  end
356
362
 
357
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
358
- # that `Constraint` on the resource if one does not exist.
359
- # Not supplying an `etag` on the request `Policy` results in an unconditional
360
- # write of the `Policy`.
363
+ # Gets the effective `Policy` on a resource. This is the result of merging
364
+ # `Policies` in the resource hierarchy. The returned `Policy` will not have
365
+ # an `etag`set because it is a computed `Policy` across multiple resources.
361
366
  # @param [String] resource
362
- # Resource name of the resource to attach the `Policy`.
363
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
367
+ # The name of the resource to start computing the effective `Policy`.
368
+ # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
364
369
  # @param [String] fields
365
370
  # Selector specifying which fields to include in a partial response.
366
371
  # @param [String] quota_user
@@ -378,10 +383,10 @@ module Google
378
383
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
379
384
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
380
385
  # @raise [Google::Apis::AuthorizationError] Authorization is required
381
- def set_organization_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
382
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
383
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
384
- command.request_object = set_org_policy_request_object
386
+ def get_project_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
387
+ command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
388
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
389
+ command.request_object = get_effective_org_policy_request_object
385
390
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
386
391
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
387
392
  command.params['resource'] = resource unless resource.nil?
@@ -390,13 +395,16 @@ module Google
390
395
  execute_or_queue_command(command, &block)
391
396
  end
392
397
 
393
- # Sets the access control policy on an Organization resource. Replaces any
394
- # existing policy. The `resource` field should be the organization's resource
395
- # name, e.g. "organizations/123".
396
- # @param [String] resource
397
- # REQUIRED: The resource for which the policy is being specified.
398
- # See the operation documentation for the appropriate value for this field.
399
- # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
398
+ # Restores the Project identified by the specified
399
+ # `project_id` (for example, `my-project-123`).
400
+ # You can only use this method for a Project that has a lifecycle state of
401
+ # DELETE_REQUESTED.
402
+ # After deletion starts, the Project cannot be restored.
403
+ # The caller must have modify permissions for this Project.
404
+ # @param [String] project_id
405
+ # The project ID (for example, `foo-bar-123`).
406
+ # Required.
407
+ # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
400
408
  # @param [String] fields
401
409
  # Selector specifying which fields to include in a partial response.
402
410
  # @param [String] quota_user
@@ -406,32 +414,33 @@ module Google
406
414
  # Request-specific options
407
415
  #
408
416
  # @yield [result, err] Result & error if block supplied
409
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
417
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
410
418
  # @yieldparam err [StandardError] error object if request failed
411
419
  #
412
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
420
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
413
421
  #
414
422
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
415
423
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
416
424
  # @raise [Google::Apis::AuthorizationError] Authorization is required
417
- def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
418
- command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
419
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
420
- command.request_object = set_iam_policy_request_object
421
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
422
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
423
- command.params['resource'] = resource unless resource.nil?
425
+ def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
426
+ command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
427
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
428
+ command.request_object = undelete_project_request_object
429
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
430
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
431
+ command.params['projectId'] = project_id unless project_id.nil?
424
432
  command.query['fields'] = fields unless fields.nil?
425
433
  command.query['quotaUser'] = quota_user unless quota_user.nil?
426
434
  execute_or_queue_command(command, &block)
427
435
  end
428
436
 
429
- # Create a Lien which applies to the resource denoted by the `parent` field.
430
- # Callers of this method will require permission on the `parent` resource.
431
- # For example, applying to `projects/1234` requires permission
432
- # `resourcemanager.projects.updateLiens`.
433
- # NOTE: Some resources may limit the number of Liens which may be applied.
434
- # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_object
437
+ # Updates the attributes of the Project identified by the specified
438
+ # `project_id` (for example, `my-project-123`).
439
+ # The caller must have modify permissions for this Project.
440
+ # @param [String] project_id
441
+ # The project ID (for example, `my-project-123`).
442
+ # Required.
443
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
435
444
  # @param [String] fields
436
445
  # Selector specifying which fields to include in a partial response.
437
446
  # @param [String] quota_user
@@ -441,31 +450,56 @@ module Google
441
450
  # Request-specific options
442
451
  #
443
452
  # @yield [result, err] Result & error if block supplied
444
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Lien] parsed result object
453
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
445
454
  # @yieldparam err [StandardError] error object if request failed
446
455
  #
447
- # @return [Google::Apis::CloudresourcemanagerV1::Lien]
456
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
448
457
  #
449
458
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
450
459
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
451
460
  # @raise [Google::Apis::AuthorizationError] Authorization is required
452
- def create_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
453
- command = make_simple_command(:post, 'v1/liens', options)
454
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
455
- command.request_object = lien_object
456
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
457
- command.response_class = Google::Apis::CloudresourcemanagerV1::Lien
461
+ def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
462
+ command = make_simple_command(:put, 'v1/projects/{projectId}', options)
463
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
464
+ command.request_object = project_object
465
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
466
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
467
+ command.params['projectId'] = project_id unless project_id.nil?
458
468
  command.query['fields'] = fields unless fields.nil?
459
469
  command.query['quotaUser'] = quota_user unless quota_user.nil?
460
470
  execute_or_queue_command(command, &block)
461
471
  end
462
472
 
463
- # Delete a Lien by `name`.
464
- # Callers of this method will require permission on the `parent` resource.
465
- # For example, a Lien with a `parent` of `projects/1234` requires permission
466
- # `resourcemanager.projects.updateLiens`.
467
- # @param [String] name
468
- # The name/identifier of the Lien to delete.
473
+ # Lists Projects that are visible to the user and satisfy the
474
+ # specified filter. This method returns Projects in an unspecified order.
475
+ # New Projects do not necessarily appear at the end of the list.
476
+ # @param [String] filter
477
+ # An expression for filtering the results of the request. Filter rules are
478
+ # case insensitive. The fields eligible for filtering are:
479
+ # + `name`
480
+ # + `id`
481
+ # + <code>labels.<em>key</em></code> where *key* is the name of a label
482
+ # Some examples of using labels as filters:
483
+ # |Filter|Description|
484
+ # |------|-----------|
485
+ # |name:how*|The project's name starts with "how".|
486
+ # |name:Howl|The project's name is `Howl` or `howl`.|
487
+ # |name:HOWL|Equivalent to above.|
488
+ # |NAME:howl|Equivalent to above.|
489
+ # |labels.color:*|The project has the label `color`.|
490
+ # |labels.color:red|The project's label `color` has the value `red`.|
491
+ # |labels.color:red&nbsp;labels.size:big|The project's label `color` has the
492
+ # value `red` and its label `size` has the value `big`.
493
+ # Optional.
494
+ # @param [String] page_token
495
+ # A pagination token returned from a previous call to ListProjects
496
+ # that indicates from where listing should continue.
497
+ # Optional.
498
+ # @param [Fixnum] page_size
499
+ # The maximum number of Projects to return in the response.
500
+ # The server can return fewer Projects than requested.
501
+ # If unspecified, server picks an appropriate default.
502
+ # Optional.
469
503
  # @param [String] fields
470
504
  # Selector specifying which fields to include in a partial response.
471
505
  # @param [String] quota_user
@@ -475,35 +509,33 @@ module Google
475
509
  # Request-specific options
476
510
  #
477
511
  # @yield [result, err] Result & error if block supplied
478
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
512
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
479
513
  # @yieldparam err [StandardError] error object if request failed
480
514
  #
481
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
515
+ # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
482
516
  #
483
517
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
484
518
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
485
519
  # @raise [Google::Apis::AuthorizationError] Authorization is required
486
- def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
487
- command = make_simple_command(:delete, 'v1/{+name}', options)
488
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
489
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
490
- command.params['name'] = name unless name.nil?
520
+ def list_projects(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
521
+ command = make_simple_command(:get, 'v1/projects', options)
522
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
523
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
524
+ command.query['filter'] = filter unless filter.nil?
525
+ command.query['pageToken'] = page_token unless page_token.nil?
526
+ command.query['pageSize'] = page_size unless page_size.nil?
491
527
  command.query['fields'] = fields unless fields.nil?
492
528
  command.query['quotaUser'] = quota_user unless quota_user.nil?
493
529
  execute_or_queue_command(command, &block)
494
530
  end
495
531
 
496
- # List all Liens applied to the `parent` resource.
497
- # Callers of this method will require permission on the `parent` resource.
498
- # For example, a Lien with a `parent` of `projects/1234` requires permission
499
- # `resourcemanager.projects.get`.
500
- # @param [String] parent
501
- # The name of the resource to list all attached Liens.
502
- # For example, `projects/1234`.
503
- # @param [String] page_token
504
- # The `next_page_token` value returned from a previous List request, if any.
505
- # @param [Fixnum] page_size
506
- # The maximum number of items to return. This is a suggestion for the server.
532
+ # Updates the specified `Policy` on the resource. Creates a new `Policy` for
533
+ # that `Constraint` on the resource if one does not exist.
534
+ # Not supplying an `etag` on the request `Policy` results in an unconditional
535
+ # write of the `Policy`.
536
+ # @param [String] resource
537
+ # Resource name of the resource to attach the `Policy`.
538
+ # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
507
539
  # @param [String] fields
508
540
  # Selector specifying which fields to include in a partial response.
509
541
  # @param [String] quota_user
@@ -513,31 +545,34 @@ module Google
513
545
  # Request-specific options
514
546
  #
515
547
  # @yield [result, err] Result & error if block supplied
516
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] parsed result object
548
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
517
549
  # @yieldparam err [StandardError] error object if request failed
518
550
  #
519
- # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse]
551
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
520
552
  #
521
553
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
522
554
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
523
555
  # @raise [Google::Apis::AuthorizationError] Authorization is required
524
- def list_liens(parent: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
525
- command = make_simple_command(:get, 'v1/liens', options)
526
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation
527
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse
528
- command.query['parent'] = parent unless parent.nil?
529
- command.query['pageToken'] = page_token unless page_token.nil?
530
- command.query['pageSize'] = page_size unless page_size.nil?
556
+ def set_project_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
557
+ command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
558
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
559
+ command.request_object = set_org_policy_request_object
560
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
561
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
562
+ command.params['resource'] = resource unless resource.nil?
531
563
  command.query['fields'] = fields unless fields.nil?
532
564
  command.query['quotaUser'] = quota_user unless quota_user.nil?
533
565
  execute_or_queue_command(command, &block)
534
566
  end
535
567
 
536
- # Gets the latest state of a long-running operation. Clients can use this
537
- # method to poll the operation result at intervals as recommended by the API
538
- # service.
539
- # @param [String] name
540
- # The name of the operation resource.
568
+ # Request that a new Project be created. The result is an Operation which
569
+ # can be used to track the creation process. It is automatically deleted
570
+ # after a few hours, so there is no need to call DeleteOperation.
571
+ # Our SLO permits Project creation to take up to 30 seconds at the 90th
572
+ # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
573
+ # latency. 95th percentile latency is around 11 seconds. We recommend
574
+ # polling at the 5th second with an exponential backoff.
575
+ # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
541
576
  # @param [String] fields
542
577
  # Selector specifying which fields to include in a partial response.
543
578
  # @param [String] quota_user
@@ -555,20 +590,21 @@ module Google
555
590
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
556
591
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
557
592
  # @raise [Google::Apis::AuthorizationError] Authorization is required
558
- def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
559
- command = make_simple_command(:get, 'v1/{+name}', options)
593
+ def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
594
+ command = make_simple_command(:post, 'v1/projects', options)
595
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
596
+ command.request_object = project_object
560
597
  command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
561
598
  command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
562
- command.params['name'] = name unless name.nil?
563
599
  command.query['fields'] = fields unless fields.nil?
564
600
  command.query['quotaUser'] = quota_user unless quota_user.nil?
565
601
  execute_or_queue_command(command, &block)
566
602
  end
567
603
 
568
- # Clears a `Policy` from a resource.
604
+ # Lists all the `Policies` set for a particular resource.
569
605
  # @param [String] resource
570
- # Name of the resource for the `Policy` to clear.
571
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
606
+ # Name of the resource to list Policies for.
607
+ # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
572
608
  # @param [String] fields
573
609
  # Selector specifying which fields to include in a partial response.
574
610
  # @param [String] quota_user
@@ -578,33 +614,32 @@ module Google
578
614
  # Request-specific options
579
615
  #
580
616
  # @yield [result, err] Result & error if block supplied
581
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
617
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
582
618
  # @yieldparam err [StandardError] error object if request failed
583
619
  #
584
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
620
+ # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
585
621
  #
586
622
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
587
623
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
588
624
  # @raise [Google::Apis::AuthorizationError] Authorization is required
589
- def clear_folder_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
590
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
591
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
592
- command.request_object = clear_org_policy_request_object
593
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
594
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
625
+ def list_project_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
626
+ command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
627
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
628
+ command.request_object = list_org_policies_request_object
629
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
630
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
595
631
  command.params['resource'] = resource unless resource.nil?
596
632
  command.query['fields'] = fields unless fields.nil?
597
633
  command.query['quotaUser'] = quota_user unless quota_user.nil?
598
634
  execute_or_queue_command(command, &block)
599
635
  end
600
636
 
601
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
602
- # that `Constraint` on the resource if one does not exist.
603
- # Not supplying an `etag` on the request `Policy` results in an unconditional
604
- # write of the `Policy`.
605
- # @param [String] resource
606
- # Resource name of the resource to attach the `Policy`.
607
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
637
+ # Retrieves the Project identified by the specified
638
+ # `project_id` (for example, `my-project-123`).
639
+ # The caller must have read permissions for this Project.
640
+ # @param [String] project_id
641
+ # The Project ID (for example, `my-project-123`).
642
+ # Required.
608
643
  # @param [String] fields
609
644
  # Selector specifying which fields to include in a partial response.
610
645
  # @param [String] quota_user
@@ -614,30 +649,31 @@ module Google
614
649
  # Request-specific options
615
650
  #
616
651
  # @yield [result, err] Result & error if block supplied
617
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
652
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
618
653
  # @yieldparam err [StandardError] error object if request failed
619
654
  #
620
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
655
+ # @return [Google::Apis::CloudresourcemanagerV1::Project]
621
656
  #
622
657
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
623
658
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
624
659
  # @raise [Google::Apis::AuthorizationError] Authorization is required
625
- def set_folder_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
626
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
627
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
628
- command.request_object = set_org_policy_request_object
629
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
630
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
631
- command.params['resource'] = resource unless resource.nil?
660
+ def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
661
+ command = make_simple_command(:get, 'v1/projects/{projectId}', options)
662
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
663
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Project
664
+ command.params['projectId'] = project_id unless project_id.nil?
632
665
  command.query['fields'] = fields unless fields.nil?
633
666
  command.query['quotaUser'] = quota_user unless quota_user.nil?
634
667
  execute_or_queue_command(command, &block)
635
668
  end
636
669
 
637
- # Lists `Constraints` that could be applied on the specified resource.
638
- # @param [String] resource
639
- # Name of the resource to list `Constraints` for.
640
- # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
670
+ # Gets a list of ancestors in the resource hierarchy for the Project
671
+ # identified by the specified `project_id` (for example, `my-project-123`).
672
+ # The caller must have read permissions for this Project.
673
+ # @param [String] project_id
674
+ # The Project ID (for example, `my-project-123`).
675
+ # Required.
676
+ # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object
641
677
  # @param [String] fields
642
678
  # Selector specifying which fields to include in a partial response.
643
679
  # @param [String] quota_user
@@ -647,30 +683,31 @@ module Google
647
683
  # Request-specific options
648
684
  #
649
685
  # @yield [result, err] Result & error if block supplied
650
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
686
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] parsed result object
651
687
  # @yieldparam err [StandardError] error object if request failed
652
688
  #
653
- # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
689
+ # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse]
654
690
  #
655
691
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
656
692
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
657
693
  # @raise [Google::Apis::AuthorizationError] Authorization is required
658
- def list_folder_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
659
- command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
660
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
661
- command.request_object = list_available_org_policy_constraints_request_object
662
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
663
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
664
- command.params['resource'] = resource unless resource.nil?
694
+ def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
695
+ command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
696
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
697
+ command.request_object = get_ancestry_request_object
698
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
699
+ command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
700
+ command.params['projectId'] = project_id unless project_id.nil?
665
701
  command.query['fields'] = fields unless fields.nil?
666
702
  command.query['quotaUser'] = quota_user unless quota_user.nil?
667
703
  execute_or_queue_command(command, &block)
668
704
  end
669
705
 
670
- # Lists all the `Policies` set for a particular resource.
706
+ # Returns permissions that a caller has on the specified Project.
671
707
  # @param [String] resource
672
- # Name of the resource to list Policies for.
673
- # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
708
+ # REQUIRED: The resource for which the policy detail is being requested.
709
+ # See the operation documentation for the appropriate value for this field.
710
+ # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
674
711
  # @param [String] fields
675
712
  # Selector specifying which fields to include in a partial response.
676
713
  # @param [String] quota_user
@@ -680,34 +717,48 @@ module Google
680
717
  # Request-specific options
681
718
  #
682
719
  # @yield [result, err] Result & error if block supplied
683
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
720
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
684
721
  # @yieldparam err [StandardError] error object if request failed
685
722
  #
686
- # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
723
+ # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
687
724
  #
688
725
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
689
726
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
690
727
  # @raise [Google::Apis::AuthorizationError] Authorization is required
691
- def list_folder_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
692
- command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
693
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
694
- command.request_object = list_org_policies_request_object
695
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
696
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
728
+ def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
729
+ command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options)
730
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
731
+ command.request_object = test_iam_permissions_request_object
732
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
733
+ command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
697
734
  command.params['resource'] = resource unless resource.nil?
698
735
  command.query['fields'] = fields unless fields.nil?
699
736
  command.query['quotaUser'] = quota_user unless quota_user.nil?
700
737
  execute_or_queue_command(command, &block)
701
738
  end
702
739
 
703
- # Gets a `Policy` on a resource.
704
- # If no `Policy` is set on the resource, a `Policy` is returned with default
705
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
706
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
707
- # `Policy` during read-modify-write.
708
- # @param [String] resource
709
- # Name of the resource the `Policy` is set on.
710
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
740
+ # Marks the Project identified by the specified
741
+ # `project_id` (for example, `my-project-123`) for deletion.
742
+ # This method will only affect the Project if the following criteria are met:
743
+ # + The Project does not have a billing account associated with it.
744
+ # + The Project has a lifecycle state of
745
+ # ACTIVE.
746
+ # This method changes the Project's lifecycle state from
747
+ # ACTIVE
748
+ # to DELETE_REQUESTED.
749
+ # The deletion starts at an unspecified time,
750
+ # at which point the Project is no longer accessible.
751
+ # Until the deletion completes, you can check the lifecycle state
752
+ # checked by retrieving the Project with GetProject,
753
+ # and the Project remains visible to ListProjects.
754
+ # However, you cannot update the project.
755
+ # After the deletion completes, the Project is not retrievable by
756
+ # the GetProject and
757
+ # ListProjects methods.
758
+ # The caller must have modify permissions for this Project.
759
+ # @param [String] project_id
760
+ # The Project ID (for example, `foo-bar-123`).
761
+ # Required.
711
762
  # @param [String] fields
712
763
  # Selector specifying which fields to include in a partial response.
713
764
  # @param [String] quota_user
@@ -717,32 +768,28 @@ module Google
717
768
  # Request-specific options
718
769
  #
719
770
  # @yield [result, err] Result & error if block supplied
720
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
771
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
721
772
  # @yieldparam err [StandardError] error object if request failed
722
773
  #
723
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
774
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
724
775
  #
725
776
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
726
777
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
727
778
  # @raise [Google::Apis::AuthorizationError] Authorization is required
728
- def get_folder_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
729
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
730
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
731
- command.request_object = get_org_policy_request_object
732
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
733
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
734
- command.params['resource'] = resource unless resource.nil?
779
+ def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
780
+ command = make_simple_command(:delete, 'v1/projects/{projectId}', options)
781
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
782
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
783
+ command.params['projectId'] = project_id unless project_id.nil?
735
784
  command.query['fields'] = fields unless fields.nil?
736
785
  command.query['quotaUser'] = quota_user unless quota_user.nil?
737
786
  execute_or_queue_command(command, &block)
738
787
  end
739
788
 
740
- # Gets the effective `Policy` on a resource. This is the result of merging
741
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
742
- # an `etag`set because it is a computed `Policy` across multiple resources.
789
+ # Clears a `Policy` from a resource.
743
790
  # @param [String] resource
744
- # The name of the resource to start computing the effective `Policy`.
745
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
791
+ # Name of the resource for the `Policy` to clear.
792
+ # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
746
793
  # @param [String] fields
747
794
  # Selector specifying which fields to include in a partial response.
748
795
  # @param [String] quota_user
@@ -752,20 +799,20 @@ module Google
752
799
  # Request-specific options
753
800
  #
754
801
  # @yield [result, err] Result & error if block supplied
755
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
802
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
756
803
  # @yieldparam err [StandardError] error object if request failed
757
804
  #
758
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
805
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
759
806
  #
760
807
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
761
808
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
762
809
  # @raise [Google::Apis::AuthorizationError] Authorization is required
763
- def get_folder_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
764
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
765
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
766
- command.request_object = get_effective_org_policy_request_object
767
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
768
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
810
+ def clear_project_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
811
+ command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
812
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
813
+ command.request_object = clear_org_policy_request_object
814
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
815
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
769
816
  command.params['resource'] = resource unless resource.nil?
770
817
  command.query['fields'] = fields unless fields.nil?
771
818
  command.query['quotaUser'] = quota_user unless quota_user.nil?
@@ -833,10 +880,13 @@ module Google
833
880
  execute_or_queue_command(command, &block)
834
881
  end
835
882
 
836
- # Lists `Constraints` that could be applied on the specified resource.
883
+ # Returns permissions that a caller has on the specified Organization.
884
+ # The `resource` field should be the organization's resource name,
885
+ # e.g. "organizations/123".
837
886
  # @param [String] resource
838
- # Name of the resource to list `Constraints` for.
839
- # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
887
+ # REQUIRED: The resource for which the policy detail is being requested.
888
+ # See the operation documentation for the appropriate value for this field.
889
+ # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
840
890
  # @param [String] fields
841
891
  # Selector specifying which fields to include in a partial response.
842
892
  # @param [String] quota_user
@@ -846,32 +896,30 @@ module Google
846
896
  # Request-specific options
847
897
  #
848
898
  # @yield [result, err] Result & error if block supplied
849
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
899
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
850
900
  # @yieldparam err [StandardError] error object if request failed
851
901
  #
852
- # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
902
+ # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
853
903
  #
854
904
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
855
905
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
856
906
  # @raise [Google::Apis::AuthorizationError] Authorization is required
857
- def list_project_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
858
- command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
859
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
860
- command.request_object = list_available_org_policy_constraints_request_object
861
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
862
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
907
+ def test_organization_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
908
+ command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
909
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
910
+ command.request_object = test_iam_permissions_request_object
911
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
912
+ command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
863
913
  command.params['resource'] = resource unless resource.nil?
864
914
  command.query['fields'] = fields unless fields.nil?
865
915
  command.query['quotaUser'] = quota_user unless quota_user.nil?
866
916
  execute_or_queue_command(command, &block)
867
917
  end
868
918
 
869
- # Returns the IAM access control policy for the specified Project.
870
- # Permission is denied if the policy or the resource does not exist.
919
+ # Clears a `Policy` from a resource.
871
920
  # @param [String] resource
872
- # REQUIRED: The resource for which the policy is being requested.
873
- # See the operation documentation for the appropriate value for this field.
874
- # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
921
+ # Name of the resource for the `Policy` to clear.
922
+ # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
875
923
  # @param [String] fields
876
924
  # Selector specifying which fields to include in a partial response.
877
925
  # @param [String] quota_user
@@ -881,34 +929,33 @@ module Google
881
929
  # Request-specific options
882
930
  #
883
931
  # @yield [result, err] Result & error if block supplied
884
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
932
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
885
933
  # @yieldparam err [StandardError] error object if request failed
886
934
  #
887
- # @return [Google::Apis::CloudresourcemanagerV1::Policy]
935
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
888
936
  #
889
937
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
890
938
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
891
939
  # @raise [Google::Apis::AuthorizationError] Authorization is required
892
- def get_project_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
893
- command = make_simple_command(:post, 'v1/projects/{resource}:getIamPolicy', options)
894
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
895
- command.request_object = get_iam_policy_request_object
896
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
897
- command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
940
+ def clear_organization_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
941
+ command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
942
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
943
+ command.request_object = clear_org_policy_request_object
944
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
945
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
898
946
  command.params['resource'] = resource unless resource.nil?
899
947
  command.query['fields'] = fields unless fields.nil?
900
948
  command.query['quotaUser'] = quota_user unless quota_user.nil?
901
949
  execute_or_queue_command(command, &block)
902
950
  end
903
951
 
904
- # Gets a `Policy` on a resource.
905
- # If no `Policy` is set on the resource, a `Policy` is returned with default
906
- # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
907
- # `etag` value can be used with `SetOrgPolicy()` to create or update a
908
- # `Policy` during read-modify-write.
952
+ # Updates the specified `Policy` on the resource. Creates a new `Policy` for
953
+ # that `Constraint` on the resource if one does not exist.
954
+ # Not supplying an `etag` on the request `Policy` results in an unconditional
955
+ # write of the `Policy`.
909
956
  # @param [String] resource
910
- # Name of the resource the `Policy` is set on.
911
- # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
957
+ # Resource name of the resource to attach the `Policy`.
958
+ # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
912
959
  # @param [String] fields
913
960
  # Selector specifying which fields to include in a partial response.
914
961
  # @param [String] quota_user
@@ -926,10 +973,10 @@ module Google
926
973
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
927
974
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
928
975
  # @raise [Google::Apis::AuthorizationError] Authorization is required
929
- def get_project_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
930
- command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
931
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
932
- command.request_object = get_org_policy_request_object
976
+ def set_organization_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
977
+ command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
978
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
979
+ command.request_object = set_org_policy_request_object
933
980
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
934
981
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
935
982
  command.params['resource'] = resource unless resource.nil?
@@ -938,12 +985,13 @@ module Google
938
985
  execute_or_queue_command(command, &block)
939
986
  end
940
987
 
941
- # Gets the effective `Policy` on a resource. This is the result of merging
942
- # `Policies` in the resource hierarchy. The returned `Policy` will not have
943
- # an `etag`set because it is a computed `Policy` across multiple resources.
988
+ # Sets the access control policy on an Organization resource. Replaces any
989
+ # existing policy. The `resource` field should be the organization's resource
990
+ # name, e.g. "organizations/123".
944
991
  # @param [String] resource
945
- # The name of the resource to start computing the effective `Policy`.
946
- # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
992
+ # REQUIRED: The resource for which the policy is being specified.
993
+ # See the operation documentation for the appropriate value for this field.
994
+ # @param [Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
947
995
  # @param [String] fields
948
996
  # Selector specifying which fields to include in a partial response.
949
997
  # @param [String] quota_user
@@ -953,36 +1001,30 @@ module Google
953
1001
  # Request-specific options
954
1002
  #
955
1003
  # @yield [result, err] Result & error if block supplied
956
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1004
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
957
1005
  # @yieldparam err [StandardError] error object if request failed
958
1006
  #
959
- # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1007
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
960
1008
  #
961
1009
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
962
1010
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
963
1011
  # @raise [Google::Apis::AuthorizationError] Authorization is required
964
- def get_project_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
965
- command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
966
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
967
- command.request_object = get_effective_org_policy_request_object
968
- command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
969
- command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1012
+ def set_organization_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1013
+ command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
1014
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest::Representation
1015
+ command.request_object = set_iam_policy_request_object
1016
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
1017
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
970
1018
  command.params['resource'] = resource unless resource.nil?
971
1019
  command.query['fields'] = fields unless fields.nil?
972
1020
  command.query['quotaUser'] = quota_user unless quota_user.nil?
973
1021
  execute_or_queue_command(command, &block)
974
1022
  end
975
1023
 
976
- # Restores the Project identified by the specified
977
- # `project_id` (for example, `my-project-123`).
978
- # You can only use this method for a Project that has a lifecycle state of
979
- # DELETE_REQUESTED.
980
- # After deletion starts, the Project cannot be restored.
981
- # The caller must have modify permissions for this Project.
982
- # @param [String] project_id
983
- # The project ID (for example, `foo-bar-123`).
984
- # Required.
985
- # @param [Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest] undelete_project_request_object
1024
+ # Lists all the `Policies` set for a particular resource.
1025
+ # @param [String] resource
1026
+ # Name of the resource to list Policies for.
1027
+ # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
986
1028
  # @param [String] fields
987
1029
  # Selector specifying which fields to include in a partial response.
988
1030
  # @param [String] quota_user
@@ -992,33 +1034,30 @@ module Google
992
1034
  # Request-specific options
993
1035
  #
994
1036
  # @yield [result, err] Result & error if block supplied
995
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1037
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
996
1038
  # @yieldparam err [StandardError] error object if request failed
997
1039
  #
998
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1040
+ # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
999
1041
  #
1000
1042
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1001
1043
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1002
1044
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1003
- def undelete_project(project_id, undelete_project_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1004
- command = make_simple_command(:post, 'v1/projects/{projectId}:undelete', options)
1005
- command.request_representation = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest::Representation
1006
- command.request_object = undelete_project_request_object
1007
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1008
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1009
- command.params['projectId'] = project_id unless project_id.nil?
1045
+ def list_organization_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1046
+ command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
1047
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
1048
+ command.request_object = list_org_policies_request_object
1049
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
1050
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
1051
+ command.params['resource'] = resource unless resource.nil?
1010
1052
  command.query['fields'] = fields unless fields.nil?
1011
1053
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1012
1054
  execute_or_queue_command(command, &block)
1013
1055
  end
1014
1056
 
1015
- # Updates the attributes of the Project identified by the specified
1016
- # `project_id` (for example, `my-project-123`).
1017
- # The caller must have modify permissions for this Project.
1018
- # @param [String] project_id
1019
- # The project ID (for example, `my-project-123`).
1020
- # Required.
1021
- # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
1057
+ # Lists `Constraints` that could be applied on the specified resource.
1058
+ # @param [String] resource
1059
+ # Name of the resource to list `Constraints` for.
1060
+ # @param [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest] list_available_org_policy_constraints_request_object
1022
1061
  # @param [String] fields
1023
1062
  # Selector specifying which fields to include in a partial response.
1024
1063
  # @param [String] quota_user
@@ -1028,56 +1067,33 @@ module Google
1028
1067
  # Request-specific options
1029
1068
  #
1030
1069
  # @yield [result, err] Result & error if block supplied
1031
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
1070
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse] parsed result object
1032
1071
  # @yieldparam err [StandardError] error object if request failed
1033
1072
  #
1034
- # @return [Google::Apis::CloudresourcemanagerV1::Project]
1073
+ # @return [Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse]
1035
1074
  #
1036
1075
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1037
1076
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1038
1077
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1039
- def update_project(project_id, project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1040
- command = make_simple_command(:put, 'v1/projects/{projectId}', options)
1041
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1042
- command.request_object = project_object
1043
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1044
- command.response_class = Google::Apis::CloudresourcemanagerV1::Project
1045
- command.params['projectId'] = project_id unless project_id.nil?
1078
+ def list_organization_available_org_policy_constraints(resource, list_available_org_policy_constraints_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1079
+ command = make_simple_command(:post, 'v1/{+resource}:listAvailableOrgPolicyConstraints', options)
1080
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsRequest::Representation
1081
+ command.request_object = list_available_org_policy_constraints_request_object
1082
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse::Representation
1083
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListAvailableOrgPolicyConstraintsResponse
1084
+ command.params['resource'] = resource unless resource.nil?
1046
1085
  command.query['fields'] = fields unless fields.nil?
1047
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1048
- execute_or_queue_command(command, &block)
1049
- end
1050
-
1051
- # Lists Projects that are visible to the user and satisfy the
1052
- # specified filter. This method returns Projects in an unspecified order.
1053
- # New Projects do not necessarily appear at the end of the list.
1054
- # @param [String] filter
1055
- # An expression for filtering the results of the request. Filter rules are
1056
- # case insensitive. The fields eligible for filtering are:
1057
- # + `name`
1058
- # + `id`
1059
- # + <code>labels.<em>key</em></code> where *key* is the name of a label
1060
- # Some examples of using labels as filters:
1061
- # |Filter|Description|
1062
- # |------|-----------|
1063
- # |name:*|The project has a name.|
1064
- # |name:Howl|The project's name is `Howl` or `howl`.|
1065
- # |name:HOWL|Equivalent to above.|
1066
- # |NAME:howl|Equivalent to above.|
1067
- # |labels.color:*|The project has the label `color`.|
1068
- # |labels.color:red|The project's label `color` has the value `red`.|
1069
- # |labels.color:red&nbsp;labels.size:big|The project's label `color` has the
1070
- # value `red` and its label `size` has the value `big`.
1071
- # Optional.
1072
- # @param [String] page_token
1073
- # A pagination token returned from a previous call to ListProjects
1074
- # that indicates from where listing should continue.
1075
- # Optional.
1076
- # @param [Fixnum] page_size
1077
- # The maximum number of Projects to return in the response.
1078
- # The server can return fewer Projects than requested.
1079
- # If unspecified, server picks an appropriate default.
1080
- # Optional.
1086
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1087
+ execute_or_queue_command(command, &block)
1088
+ end
1089
+
1090
+ # Gets the access control policy for an Organization resource. May be empty
1091
+ # if no such policy or resource exists. The `resource` field should be the
1092
+ # organization's resource name, e.g. "organizations/123".
1093
+ # @param [String] resource
1094
+ # REQUIRED: The resource for which the policy is being requested.
1095
+ # See the operation documentation for the appropriate value for this field.
1096
+ # @param [Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
1081
1097
  # @param [String] fields
1082
1098
  # Selector specifying which fields to include in a partial response.
1083
1099
  # @param [String] quota_user
@@ -1087,33 +1103,34 @@ module Google
1087
1103
  # Request-specific options
1088
1104
  #
1089
1105
  # @yield [result, err] Result & error if block supplied
1090
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse] parsed result object
1106
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Policy] parsed result object
1091
1107
  # @yieldparam err [StandardError] error object if request failed
1092
1108
  #
1093
- # @return [Google::Apis::CloudresourcemanagerV1::ListProjectsResponse]
1109
+ # @return [Google::Apis::CloudresourcemanagerV1::Policy]
1094
1110
  #
1095
1111
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1096
1112
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1097
1113
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1098
- def list_projects(filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
1099
- command = make_simple_command(:get, 'v1/projects', options)
1100
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse::Representation
1101
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListProjectsResponse
1102
- command.query['filter'] = filter unless filter.nil?
1103
- command.query['pageToken'] = page_token unless page_token.nil?
1104
- command.query['pageSize'] = page_size unless page_size.nil?
1114
+ def get_organization_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1115
+ command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
1116
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest::Representation
1117
+ command.request_object = get_iam_policy_request_object
1118
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Policy::Representation
1119
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Policy
1120
+ command.params['resource'] = resource unless resource.nil?
1105
1121
  command.query['fields'] = fields unless fields.nil?
1106
1122
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1107
1123
  execute_or_queue_command(command, &block)
1108
1124
  end
1109
1125
 
1110
- # Updates the specified `Policy` on the resource. Creates a new `Policy` for
1111
- # that `Constraint` on the resource if one does not exist.
1112
- # Not supplying an `etag` on the request `Policy` results in an unconditional
1113
- # write of the `Policy`.
1126
+ # Gets a `Policy` on a resource.
1127
+ # If no `Policy` is set on the resource, a `Policy` is returned with default
1128
+ # values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
1129
+ # `etag` value can be used with `SetOrgPolicy()` to create or update a
1130
+ # `Policy` during read-modify-write.
1114
1131
  # @param [String] resource
1115
- # Resource name of the resource to attach the `Policy`.
1116
- # @param [Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest] set_org_policy_request_object
1132
+ # Name of the resource the `Policy` is set on.
1133
+ # @param [Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest] get_org_policy_request_object
1117
1134
  # @param [String] fields
1118
1135
  # Selector specifying which fields to include in a partial response.
1119
1136
  # @param [String] quota_user
@@ -1131,10 +1148,10 @@ module Google
1131
1148
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1132
1149
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1133
1150
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1134
- def set_project_org_policy(resource, set_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1135
- command = make_simple_command(:post, 'v1/{+resource}:setOrgPolicy', options)
1136
- command.request_representation = Google::Apis::CloudresourcemanagerV1::SetOrgPolicyRequest::Representation
1137
- command.request_object = set_org_policy_request_object
1151
+ def get_organization_org_policy(resource, get_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1152
+ command = make_simple_command(:post, 'v1/{+resource}:getOrgPolicy', options)
1153
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetOrgPolicyRequest::Representation
1154
+ command.request_object = get_org_policy_request_object
1138
1155
  command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1139
1156
  command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1140
1157
  command.params['resource'] = resource unless resource.nil?
@@ -1143,14 +1160,11 @@ module Google
1143
1160
  execute_or_queue_command(command, &block)
1144
1161
  end
1145
1162
 
1146
- # Request that a new Project be created. The result is an Operation which
1147
- # can be used to track the creation process. It is automatically deleted
1148
- # after a few hours, so there is no need to call DeleteOperation.
1149
- # Our SLO permits Project creation to take up to 30 seconds at the 90th
1150
- # percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile
1151
- # latency. 95th percentile latency is around 11 seconds. We recommend
1152
- # polling at the 5th second with an exponential backoff.
1153
- # @param [Google::Apis::CloudresourcemanagerV1::Project] project_object
1163
+ # Searches Organization resources that are visible to the user and satisfy
1164
+ # the specified filter. This method returns Organizations in an unspecified
1165
+ # order. New Organizations do not necessarily appear at the end of the
1166
+ # results.
1167
+ # @param [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest] search_organizations_request_object
1154
1168
  # @param [String] fields
1155
1169
  # Selector specifying which fields to include in a partial response.
1156
1170
  # @param [String] quota_user
@@ -1160,29 +1174,31 @@ module Google
1160
1174
  # Request-specific options
1161
1175
  #
1162
1176
  # @yield [result, err] Result & error if block supplied
1163
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
1177
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse] parsed result object
1164
1178
  # @yieldparam err [StandardError] error object if request failed
1165
1179
  #
1166
- # @return [Google::Apis::CloudresourcemanagerV1::Operation]
1180
+ # @return [Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse]
1167
1181
  #
1168
1182
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1169
1183
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1170
1184
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1171
- def create_project(project_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1172
- command = make_simple_command(:post, 'v1/projects', options)
1173
- command.request_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1174
- command.request_object = project_object
1175
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
1176
- command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
1185
+ def search_organizations(search_organizations_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1186
+ command = make_simple_command(:post, 'v1/organizations:search', options)
1187
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest::Representation
1188
+ command.request_object = search_organizations_request_object
1189
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse::Representation
1190
+ command.response_class = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsResponse
1177
1191
  command.query['fields'] = fields unless fields.nil?
1178
1192
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1179
1193
  execute_or_queue_command(command, &block)
1180
1194
  end
1181
1195
 
1182
- # Lists all the `Policies` set for a particular resource.
1196
+ # Gets the effective `Policy` on a resource. This is the result of merging
1197
+ # `Policies` in the resource hierarchy. The returned `Policy` will not have
1198
+ # an `etag`set because it is a computed `Policy` across multiple resources.
1183
1199
  # @param [String] resource
1184
- # Name of the resource to list Policies for.
1185
- # @param [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest] list_org_policies_request_object
1200
+ # The name of the resource to start computing the effective `Policy`.
1201
+ # @param [Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest] get_effective_org_policy_request_object
1186
1202
  # @param [String] fields
1187
1203
  # Selector specifying which fields to include in a partial response.
1188
1204
  # @param [String] quota_user
@@ -1192,32 +1208,29 @@ module Google
1192
1208
  # Request-specific options
1193
1209
  #
1194
1210
  # @yield [result, err] Result & error if block supplied
1195
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse] parsed result object
1211
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::OrgPolicy] parsed result object
1196
1212
  # @yieldparam err [StandardError] error object if request failed
1197
1213
  #
1198
- # @return [Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse]
1214
+ # @return [Google::Apis::CloudresourcemanagerV1::OrgPolicy]
1199
1215
  #
1200
1216
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1201
1217
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1202
1218
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1203
- def list_project_org_policies(resource, list_org_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1204
- command = make_simple_command(:post, 'v1/{+resource}:listOrgPolicies', options)
1205
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesRequest::Representation
1206
- command.request_object = list_org_policies_request_object
1207
- command.response_representation = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse::Representation
1208
- command.response_class = Google::Apis::CloudresourcemanagerV1::ListOrgPoliciesResponse
1219
+ def get_organization_effective_org_policy(resource, get_effective_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1220
+ command = make_simple_command(:post, 'v1/{+resource}:getEffectiveOrgPolicy', options)
1221
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::GetEffectiveOrgPolicyRequest::Representation
1222
+ command.request_object = get_effective_org_policy_request_object
1223
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::OrgPolicy::Representation
1224
+ command.response_class = Google::Apis::CloudresourcemanagerV1::OrgPolicy
1209
1225
  command.params['resource'] = resource unless resource.nil?
1210
1226
  command.query['fields'] = fields unless fields.nil?
1211
1227
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1212
1228
  execute_or_queue_command(command, &block)
1213
1229
  end
1214
1230
 
1215
- # Retrieves the Project identified by the specified
1216
- # `project_id` (for example, `my-project-123`).
1217
- # The caller must have read permissions for this Project.
1218
- # @param [String] project_id
1219
- # The Project ID (for example, `my-project-123`).
1220
- # Required.
1231
+ # Fetches an Organization resource identified by the specified resource name.
1232
+ # @param [String] name
1233
+ # The resource name of the Organization to fetch, e.g. "organizations/1234".
1221
1234
  # @param [String] fields
1222
1235
  # Selector specifying which fields to include in a partial response.
1223
1236
  # @param [String] quota_user
@@ -1227,31 +1240,30 @@ module Google
1227
1240
  # Request-specific options
1228
1241
  #
1229
1242
  # @yield [result, err] Result & error if block supplied
1230
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Project] parsed result object
1243
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Organization] parsed result object
1231
1244
  # @yieldparam err [StandardError] error object if request failed
1232
1245
  #
1233
- # @return [Google::Apis::CloudresourcemanagerV1::Project]
1246
+ # @return [Google::Apis::CloudresourcemanagerV1::Organization]
1234
1247
  #
1235
1248
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1236
1249
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1237
1250
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1238
- def get_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
1239
- command = make_simple_command(:get, 'v1/projects/{projectId}', options)
1240
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Project::Representation
1241
- command.response_class = Google::Apis::CloudresourcemanagerV1::Project
1242
- command.params['projectId'] = project_id unless project_id.nil?
1251
+ def get_organization(name, fields: nil, quota_user: nil, options: nil, &block)
1252
+ command = make_simple_command(:get, 'v1/{+name}', options)
1253
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Organization::Representation
1254
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Organization
1255
+ command.params['name'] = name unless name.nil?
1243
1256
  command.query['fields'] = fields unless fields.nil?
1244
1257
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1245
1258
  execute_or_queue_command(command, &block)
1246
1259
  end
1247
1260
 
1248
- # Gets a list of ancestors in the resource hierarchy for the Project
1249
- # identified by the specified `project_id` (for example, `my-project-123`).
1250
- # The caller must have read permissions for this Project.
1251
- # @param [String] project_id
1252
- # The Project ID (for example, `my-project-123`).
1253
- # Required.
1254
- # @param [Google::Apis::CloudresourcemanagerV1::GetAncestryRequest] get_ancestry_request_object
1261
+ # Delete a Lien by `name`.
1262
+ # Callers of this method will require permission on the `parent` resource.
1263
+ # For example, a Lien with a `parent` of `projects/1234` requires permission
1264
+ # `resourcemanager.projects.updateLiens`.
1265
+ # @param [String] name
1266
+ # The name/identifier of the Lien to delete.
1255
1267
  # @param [String] fields
1256
1268
  # Selector specifying which fields to include in a partial response.
1257
1269
  # @param [String] quota_user
@@ -1261,31 +1273,35 @@ module Google
1261
1273
  # Request-specific options
1262
1274
  #
1263
1275
  # @yield [result, err] Result & error if block supplied
1264
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse] parsed result object
1276
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1265
1277
  # @yieldparam err [StandardError] error object if request failed
1266
1278
  #
1267
- # @return [Google::Apis::CloudresourcemanagerV1::GetAncestryResponse]
1279
+ # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1268
1280
  #
1269
1281
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1270
1282
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1271
1283
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1272
- def get_project_ancestry(project_id, get_ancestry_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1273
- command = make_simple_command(:post, 'v1/projects/{projectId}:getAncestry', options)
1274
- command.request_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryRequest::Representation
1275
- command.request_object = get_ancestry_request_object
1276
- command.response_representation = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse::Representation
1277
- command.response_class = Google::Apis::CloudresourcemanagerV1::GetAncestryResponse
1278
- command.params['projectId'] = project_id unless project_id.nil?
1284
+ def delete_lien(name, fields: nil, quota_user: nil, options: nil, &block)
1285
+ command = make_simple_command(:delete, 'v1/{+name}', options)
1286
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1287
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1288
+ command.params['name'] = name unless name.nil?
1279
1289
  command.query['fields'] = fields unless fields.nil?
1280
1290
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1281
1291
  execute_or_queue_command(command, &block)
1282
1292
  end
1283
1293
 
1284
- # Returns permissions that a caller has on the specified Project.
1285
- # @param [String] resource
1286
- # REQUIRED: The resource for which the policy detail is being requested.
1287
- # See the operation documentation for the appropriate value for this field.
1288
- # @param [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1294
+ # List all Liens applied to the `parent` resource.
1295
+ # Callers of this method will require permission on the `parent` resource.
1296
+ # For example, a Lien with a `parent` of `projects/1234` requires permission
1297
+ # `resourcemanager.projects.get`.
1298
+ # @param [String] page_token
1299
+ # The `next_page_token` value returned from a previous List request, if any.
1300
+ # @param [Fixnum] page_size
1301
+ # The maximum number of items to return. This is a suggestion for the server.
1302
+ # @param [String] parent
1303
+ # The name of the resource to list all attached Liens.
1304
+ # For example, `projects/1234`.
1289
1305
  # @param [String] fields
1290
1306
  # Selector specifying which fields to include in a partial response.
1291
1307
  # @param [String] quota_user
@@ -1295,48 +1311,32 @@ module Google
1295
1311
  # Request-specific options
1296
1312
  #
1297
1313
  # @yield [result, err] Result & error if block supplied
1298
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse] parsed result object
1314
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::ListLiensResponse] parsed result object
1299
1315
  # @yieldparam err [StandardError] error object if request failed
1300
1316
  #
1301
- # @return [Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse]
1317
+ # @return [Google::Apis::CloudresourcemanagerV1::ListLiensResponse]
1302
1318
  #
1303
1319
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1304
1320
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1305
1321
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1306
- def test_project_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1307
- command = make_simple_command(:post, 'v1/projects/{resource}:testIamPermissions', options)
1308
- command.request_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest::Representation
1309
- command.request_object = test_iam_permissions_request_object
1310
- command.response_representation = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse::Representation
1311
- command.response_class = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsResponse
1312
- command.params['resource'] = resource unless resource.nil?
1322
+ def list_liens(page_token: nil, page_size: nil, parent: nil, fields: nil, quota_user: nil, options: nil, &block)
1323
+ command = make_simple_command(:get, 'v1/liens', options)
1324
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::ListLiensResponse::Representation
1325
+ command.response_class = Google::Apis::CloudresourcemanagerV1::ListLiensResponse
1326
+ command.query['pageToken'] = page_token unless page_token.nil?
1327
+ command.query['pageSize'] = page_size unless page_size.nil?
1328
+ command.query['parent'] = parent unless parent.nil?
1313
1329
  command.query['fields'] = fields unless fields.nil?
1314
1330
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1315
1331
  execute_or_queue_command(command, &block)
1316
1332
  end
1317
1333
 
1318
- # Marks the Project identified by the specified
1319
- # `project_id` (for example, `my-project-123`) for deletion.
1320
- # This method will only affect the Project if the following criteria are met:
1321
- # + The Project does not have a billing account associated with it.
1322
- # + The Project has a lifecycle state of
1323
- # ACTIVE.
1324
- # This method changes the Project's lifecycle state from
1325
- # ACTIVE
1326
- # to DELETE_REQUESTED.
1327
- # The deletion starts at an unspecified time,
1328
- # at which point the Project is no longer accessible.
1329
- # Until the deletion completes, you can check the lifecycle state
1330
- # checked by retrieving the Project with GetProject,
1331
- # and the Project remains visible to ListProjects.
1332
- # However, you cannot update the project.
1333
- # After the deletion completes, the Project is not retrievable by
1334
- # the GetProject and
1335
- # ListProjects methods.
1336
- # The caller must have modify permissions for this Project.
1337
- # @param [String] project_id
1338
- # The Project ID (for example, `foo-bar-123`).
1339
- # Required.
1334
+ # Create a Lien which applies to the resource denoted by the `parent` field.
1335
+ # Callers of this method will require permission on the `parent` resource.
1336
+ # For example, applying to `projects/1234` requires permission
1337
+ # `resourcemanager.projects.updateLiens`.
1338
+ # NOTE: Some resources may limit the number of Liens which may be applied.
1339
+ # @param [Google::Apis::CloudresourcemanagerV1::Lien] lien_object
1340
1340
  # @param [String] fields
1341
1341
  # Selector specifying which fields to include in a partial response.
1342
1342
  # @param [String] quota_user
@@ -1346,28 +1346,30 @@ module Google
1346
1346
  # Request-specific options
1347
1347
  #
1348
1348
  # @yield [result, err] Result & error if block supplied
1349
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1349
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Lien] parsed result object
1350
1350
  # @yieldparam err [StandardError] error object if request failed
1351
1351
  #
1352
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1352
+ # @return [Google::Apis::CloudresourcemanagerV1::Lien]
1353
1353
  #
1354
1354
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1355
1355
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1356
1356
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1357
- def delete_project(project_id, fields: nil, quota_user: nil, options: nil, &block)
1358
- command = make_simple_command(:delete, 'v1/projects/{projectId}', options)
1359
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1360
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1361
- command.params['projectId'] = project_id unless project_id.nil?
1357
+ def create_lien(lien_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1358
+ command = make_simple_command(:post, 'v1/liens', options)
1359
+ command.request_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
1360
+ command.request_object = lien_object
1361
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Lien::Representation
1362
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Lien
1362
1363
  command.query['fields'] = fields unless fields.nil?
1363
1364
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1364
1365
  execute_or_queue_command(command, &block)
1365
1366
  end
1366
1367
 
1367
- # Clears a `Policy` from a resource.
1368
- # @param [String] resource
1369
- # Name of the resource for the `Policy` to clear.
1370
- # @param [Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest] clear_org_policy_request_object
1368
+ # Gets the latest state of a long-running operation. Clients can use this
1369
+ # method to poll the operation result at intervals as recommended by the API
1370
+ # service.
1371
+ # @param [String] name
1372
+ # The name of the operation resource.
1371
1373
  # @param [String] fields
1372
1374
  # Selector specifying which fields to include in a partial response.
1373
1375
  # @param [String] quota_user
@@ -1377,21 +1379,19 @@ module Google
1377
1379
  # Request-specific options
1378
1380
  #
1379
1381
  # @yield [result, err] Result & error if block supplied
1380
- # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Empty] parsed result object
1382
+ # @yieldparam result [Google::Apis::CloudresourcemanagerV1::Operation] parsed result object
1381
1383
  # @yieldparam err [StandardError] error object if request failed
1382
1384
  #
1383
- # @return [Google::Apis::CloudresourcemanagerV1::Empty]
1385
+ # @return [Google::Apis::CloudresourcemanagerV1::Operation]
1384
1386
  #
1385
1387
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1386
1388
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1387
1389
  # @raise [Google::Apis::AuthorizationError] Authorization is required
1388
- def clear_project_org_policy(resource, clear_org_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1389
- command = make_simple_command(:post, 'v1/{+resource}:clearOrgPolicy', options)
1390
- command.request_representation = Google::Apis::CloudresourcemanagerV1::ClearOrgPolicyRequest::Representation
1391
- command.request_object = clear_org_policy_request_object
1392
- command.response_representation = Google::Apis::CloudresourcemanagerV1::Empty::Representation
1393
- command.response_class = Google::Apis::CloudresourcemanagerV1::Empty
1394
- command.params['resource'] = resource unless resource.nil?
1390
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
1391
+ command = make_simple_command(:get, 'v1/{+name}', options)
1392
+ command.response_representation = Google::Apis::CloudresourcemanagerV1::Operation::Representation
1393
+ command.response_class = Google::Apis::CloudresourcemanagerV1::Operation
1394
+ command.params['name'] = name unless name.nil?
1395
1395
  command.query['fields'] = fields unless fields.nil?
1396
1396
  command.query['quotaUser'] = quota_user unless quota_user.nil?
1397
1397
  execute_or_queue_command(command, &block)