google-api-client 0.10.3 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +12 -18
  3. data/CHANGELOG.md +22 -2
  4. data/Gemfile +5 -7
  5. data/MIGRATING.md +33 -0
  6. data/README.md +10 -2
  7. data/Rakefile +1 -0
  8. data/bin/generate-api +7 -1
  9. data/dl.rb +0 -0
  10. data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +6 -6
  11. data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +1 -1
  12. data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +1 -0
  13. data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
  14. data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +759 -759
  15. data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +152 -152
  16. data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +376 -375
  17. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +58 -58
  18. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +45 -45
  19. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -21
  20. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +5 -5
  21. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +5 -5
  22. data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -0
  23. data/generated/google/apis/admin_datatransfer_v1/classes.rb +2 -2
  24. data/generated/google/apis/admin_datatransfer_v1/representations.rb +2 -2
  25. data/generated/google/apis/admin_datatransfer_v1/service.rb +2 -1
  26. data/generated/google/apis/admin_directory_v1/classes.rb +11 -11
  27. data/generated/google/apis/admin_directory_v1/representations.rb +11 -11
  28. data/generated/google/apis/admin_directory_v1/service.rb +1 -0
  29. data/generated/google/apis/admin_reports_v1/classes.rb +5 -5
  30. data/generated/google/apis/admin_reports_v1/representations.rb +4 -4
  31. data/generated/google/apis/admin_reports_v1/service.rb +1 -0
  32. data/generated/google/apis/adsense_v1_4.rb +1 -1
  33. data/generated/google/apis/adsense_v1_4/classes.rb +2 -2
  34. data/generated/google/apis/adsense_v1_4/representations.rb +2 -2
  35. data/generated/google/apis/adsense_v1_4/service.rb +1 -0
  36. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  37. data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -1
  38. data/generated/google/apis/adsensehost_v4_1/representations.rb +1 -1
  39. data/generated/google/apis/adsensehost_v4_1/service.rb +1 -0
  40. data/generated/google/apis/analytics_v3/classes.rb +10 -10
  41. data/generated/google/apis/analytics_v3/representations.rb +10 -10
  42. data/generated/google/apis/analytics_v3/service.rb +1 -0
  43. data/generated/google/apis/analyticsreporting_v4/classes.rb +933 -933
  44. data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
  45. data/generated/google/apis/analyticsreporting_v4/service.rb +5 -4
  46. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  47. data/generated/google/apis/androidenterprise_v1/classes.rb +1 -1
  48. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -1
  49. data/generated/google/apis/androidenterprise_v1/service.rb +1 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +13 -13
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +13 -13
  52. data/generated/google/apis/androidpublisher_v2/service.rb +3 -2
  53. data/generated/google/apis/appengine_v1/classes.rb +2 -2
  54. data/generated/google/apis/appengine_v1/representations.rb +2 -2
  55. data/generated/google/apis/appengine_v1/service.rb +1 -0
  56. data/generated/google/apis/appsactivity_v1/classes.rb +1 -1
  57. data/generated/google/apis/appsactivity_v1/representations.rb +1 -1
  58. data/generated/google/apis/appsactivity_v1/service.rb +1 -0
  59. data/generated/google/apis/appsmarket_v2.rb +35 -0
  60. data/generated/google/apis/appsmarket_v2/classes.rb +396 -0
  61. data/generated/google/apis/appsmarket_v2/representations.rb +180 -0
  62. data/generated/google/apis/appsmarket_v2/service.rb +187 -0
  63. data/generated/google/apis/appstate_v1.rb +1 -1
  64. data/generated/google/apis/appstate_v1/service.rb +1 -0
  65. data/generated/google/apis/bigquery_v2/classes.rb +39 -39
  66. data/generated/google/apis/bigquery_v2/representations.rb +38 -38
  67. data/generated/google/apis/bigquery_v2/service.rb +3 -2
  68. data/generated/google/apis/blogger_v3/classes.rb +2 -2
  69. data/generated/google/apis/blogger_v3/representations.rb +2 -2
  70. data/generated/google/apis/blogger_v3/service.rb +1 -0
  71. data/generated/google/apis/books_v1/classes.rb +5 -5
  72. data/generated/google/apis/books_v1/representations.rb +4 -4
  73. data/generated/google/apis/books_v1/service.rb +1 -0
  74. data/generated/google/apis/calendar_v3/classes.rb +1 -1
  75. data/generated/google/apis/calendar_v3/representations.rb +1 -1
  76. data/generated/google/apis/calendar_v3/service.rb +1 -0
  77. data/generated/google/apis/civicinfo_v2/classes.rb +6 -6
  78. data/generated/google/apis/civicinfo_v2/representations.rb +6 -6
  79. data/generated/google/apis/civicinfo_v2/service.rb +2 -1
  80. data/generated/google/apis/classroom_v1/service.rb +1 -0
  81. data/generated/google/apis/cloudbilling_v1/service.rb +1 -0
  82. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  83. data/generated/google/apis/cloudbuild_v1/classes.rb +626 -626
  84. data/generated/google/apis/cloudbuild_v1/representations.rb +109 -109
  85. data/generated/google/apis/cloudbuild_v1/service.rb +159 -158
  86. data/generated/google/apis/clouddebugger_v2/classes.rb +358 -358
  87. data/generated/google/apis/clouddebugger_v2/representations.rb +99 -99
  88. data/generated/google/apis/clouddebugger_v2/service.rb +42 -41
  89. data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
  90. data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +220 -220
  91. data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +52 -52
  92. data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +59 -58
  93. data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -7
  94. data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -1
  95. data/generated/google/apis/cloudfunctions_v1/service.rb +5 -4
  96. data/generated/google/apis/cloudkms_v1/classes.rb +311 -311
  97. data/generated/google/apis/cloudkms_v1/representations.rb +87 -87
  98. data/generated/google/apis/cloudkms_v1/service.rb +168 -167
  99. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +4 -4
  100. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +4 -4
  101. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +1 -0
  102. data/generated/google/apis/cloudresourcemanager_v1.rb +3 -3
  103. data/generated/google/apis/cloudresourcemanager_v1/classes.rb +341 -341
  104. data/generated/google/apis/cloudresourcemanager_v1/representations.rb +62 -62
  105. data/generated/google/apis/cloudresourcemanager_v1/service.rb +458 -457
  106. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +327 -327
  107. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +71 -71
  108. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +237 -236
  109. data/generated/google/apis/cloudtrace_v1.rb +3 -3
  110. data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
  111. data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
  112. data/generated/google/apis/cloudtrace_v1/service.rb +14 -13
  113. data/generated/google/apis/clouduseraccounts_beta/classes.rb +4 -4
  114. data/generated/google/apis/clouduseraccounts_beta/representations.rb +4 -4
  115. data/generated/google/apis/clouduseraccounts_beta/service.rb +1 -0
  116. data/generated/google/apis/compute_beta/classes.rb +52 -52
  117. data/generated/google/apis/compute_beta/representations.rb +52 -52
  118. data/generated/google/apis/compute_beta/service.rb +2 -1
  119. data/generated/google/apis/compute_v1/classes.rb +48 -48
  120. data/generated/google/apis/compute_v1/representations.rb +48 -48
  121. data/generated/google/apis/compute_v1/service.rb +2 -1
  122. data/generated/google/apis/container_v1/service.rb +1 -0
  123. data/generated/google/apis/content_v2.rb +1 -1
  124. data/generated/google/apis/content_v2/classes.rb +38 -660
  125. data/generated/google/apis/content_v2/representations.rb +37 -303
  126. data/generated/google/apis/content_v2/service.rb +63 -279
  127. data/generated/google/apis/customsearch_v1/classes.rb +2 -2
  128. data/generated/google/apis/customsearch_v1/representations.rb +2 -2
  129. data/generated/google/apis/customsearch_v1/service.rb +1 -0
  130. data/generated/google/apis/dataflow_v1b3/classes.rb +3281 -3281
  131. data/generated/google/apis/dataflow_v1b3/representations.rb +777 -777
  132. data/generated/google/apis/dataflow_v1b3/service.rb +106 -105
  133. data/generated/google/apis/dataproc_v1/classes.rb +395 -395
  134. data/generated/google/apis/dataproc_v1/representations.rb +91 -91
  135. data/generated/google/apis/dataproc_v1/service.rb +356 -355
  136. data/generated/google/apis/datastore_v1/classes.rb +506 -506
  137. data/generated/google/apis/datastore_v1/representations.rb +147 -147
  138. data/generated/google/apis/datastore_v1/service.rb +46 -45
  139. data/generated/google/apis/deploymentmanager_v2/classes.rb +6 -6
  140. data/generated/google/apis/deploymentmanager_v2/representations.rb +6 -6
  141. data/generated/google/apis/deploymentmanager_v2/service.rb +1 -0
  142. data/generated/google/apis/dfareporting_v2_6/classes.rb +280 -280
  143. data/generated/google/apis/dfareporting_v2_6/representations.rb +266 -266
  144. data/generated/google/apis/dfareporting_v2_6/service.rb +421 -420
  145. data/generated/google/apis/dfareporting_v2_7/classes.rb +280 -280
  146. data/generated/google/apis/dfareporting_v2_7/representations.rb +266 -266
  147. data/generated/google/apis/dfareporting_v2_7/service.rb +423 -422
  148. data/generated/google/apis/discovery_v1/service.rb +1 -0
  149. data/generated/google/apis/dns_v1/classes.rb +2 -2
  150. data/generated/google/apis/dns_v1/representations.rb +2 -2
  151. data/generated/google/apis/dns_v1/service.rb +1 -0
  152. data/generated/google/apis/dns_v2beta1/classes.rb +2 -2
  153. data/generated/google/apis/dns_v2beta1/representations.rb +2 -2
  154. data/generated/google/apis/dns_v2beta1/service.rb +1 -0
  155. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +15 -15
  156. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +13 -13
  157. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +5 -4
  158. data/generated/google/apis/doubleclicksearch_v2/classes.rb +28 -28
  159. data/generated/google/apis/doubleclicksearch_v2/representations.rb +28 -28
  160. data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -12
  161. data/generated/google/apis/drive_v2/classes.rb +17 -17
  162. data/generated/google/apis/drive_v2/representations.rb +17 -17
  163. data/generated/google/apis/drive_v2/service.rb +5 -4
  164. data/generated/google/apis/drive_v3/classes.rb +13 -13
  165. data/generated/google/apis/drive_v3/representations.rb +12 -12
  166. data/generated/google/apis/drive_v3/service.rb +1 -0
  167. data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
  168. data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +81 -81
  169. data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +24 -24
  170. data/generated/google/apis/firebasedynamiclinks_v1/service.rb +1 -0
  171. data/generated/google/apis/firebaserules_v1/classes.rb +201 -201
  172. data/generated/google/apis/firebaserules_v1/representations.rb +61 -61
  173. data/generated/google/apis/firebaserules_v1/service.rb +1 -0
  174. data/generated/google/apis/fitness_v1/classes.rb +18 -18
  175. data/generated/google/apis/fitness_v1/representations.rb +18 -18
  176. data/generated/google/apis/fitness_v1/service.rb +6 -5
  177. data/generated/google/apis/fusiontables_v2/classes.rb +2 -2
  178. data/generated/google/apis/fusiontables_v2/representations.rb +2 -2
  179. data/generated/google/apis/fusiontables_v2/service.rb +1 -0
  180. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  181. data/generated/google/apis/games_configuration_v1configuration/classes.rb +2 -2
  182. data/generated/google/apis/games_configuration_v1configuration/representations.rb +2 -2
  183. data/generated/google/apis/games_configuration_v1configuration/service.rb +1 -0
  184. data/generated/google/apis/games_management_v1management.rb +1 -1
  185. data/generated/google/apis/games_management_v1management/classes.rb +6 -6
  186. data/generated/google/apis/games_management_v1management/representations.rb +6 -6
  187. data/generated/google/apis/games_management_v1management/service.rb +1 -0
  188. data/generated/google/apis/games_v1.rb +1 -1
  189. data/generated/google/apis/games_v1/classes.rb +47 -47
  190. data/generated/google/apis/games_v1/representations.rb +47 -47
  191. data/generated/google/apis/games_v1/service.rb +58 -57
  192. data/generated/google/apis/genomics_v1.rb +6 -6
  193. data/generated/google/apis/genomics_v1/classes.rb +2354 -2354
  194. data/generated/google/apis/genomics_v1/representations.rb +487 -487
  195. data/generated/google/apis/genomics_v1/service.rb +1188 -1187
  196. data/generated/google/apis/gmail_v1/classes.rb +11 -11
  197. data/generated/google/apis/gmail_v1/representations.rb +11 -11
  198. data/generated/google/apis/gmail_v1/service.rb +2 -1
  199. data/generated/google/apis/groupsmigration_v1/service.rb +1 -0
  200. data/generated/google/apis/groupssettings_v1/service.rb +1 -0
  201. data/generated/google/apis/iam_v1/classes.rb +437 -437
  202. data/generated/google/apis/iam_v1/representations.rb +95 -95
  203. data/generated/google/apis/iam_v1/service.rb +87 -86
  204. data/generated/google/apis/identitytoolkit_v3/classes.rb +20 -20
  205. data/generated/google/apis/identitytoolkit_v3/representations.rb +20 -20
  206. data/generated/google/apis/identitytoolkit_v3/service.rb +1 -0
  207. data/generated/google/apis/kgsearch_v1/service.rb +9 -8
  208. data/generated/google/apis/language_v1.rb +1 -1
  209. data/generated/google/apis/language_v1/classes.rb +245 -245
  210. data/generated/google/apis/language_v1/representations.rb +65 -65
  211. data/generated/google/apis/language_v1/service.rb +1 -0
  212. data/generated/google/apis/language_v1beta1.rb +1 -1
  213. data/generated/google/apis/language_v1beta1/classes.rb +277 -277
  214. data/generated/google/apis/language_v1beta1/representations.rb +83 -83
  215. data/generated/google/apis/language_v1beta1/service.rb +31 -30
  216. data/generated/google/apis/licensing_v1/service.rb +1 -0
  217. data/generated/google/apis/logging_v2/classes.rb +408 -408
  218. data/generated/google/apis/logging_v2/representations.rb +93 -93
  219. data/generated/google/apis/logging_v2/service.rb +408 -407
  220. data/generated/google/apis/logging_v2beta1.rb +3 -3
  221. data/generated/google/apis/logging_v2beta1/classes.rb +892 -892
  222. data/generated/google/apis/logging_v2beta1/representations.rb +128 -128
  223. data/generated/google/apis/logging_v2beta1/service.rb +89 -88
  224. data/generated/google/apis/manufacturers_v1/classes.rb +309 -309
  225. data/generated/google/apis/manufacturers_v1/representations.rb +64 -64
  226. data/generated/google/apis/manufacturers_v1/service.rb +1 -0
  227. data/generated/google/apis/mirror_v1/service.rb +1 -0
  228. data/generated/google/apis/ml_v1/classes.rb +1185 -1185
  229. data/generated/google/apis/ml_v1/representations.rb +171 -171
  230. data/generated/google/apis/ml_v1/service.rb +282 -281
  231. data/generated/google/apis/monitoring_v3.rb +3 -3
  232. data/generated/google/apis/monitoring_v3/classes.rb +334 -334
  233. data/generated/google/apis/monitoring_v3/representations.rb +86 -86
  234. data/generated/google/apis/monitoring_v3/service.rb +344 -343
  235. data/generated/google/apis/mybusiness_v3/service.rb +1 -0
  236. data/generated/google/apis/oauth2_v2/service.rb +1 -0
  237. data/generated/google/apis/pagespeedonline_v2/classes.rb +8 -8
  238. data/generated/google/apis/pagespeedonline_v2/representations.rb +8 -8
  239. data/generated/google/apis/pagespeedonline_v2/service.rb +1 -0
  240. data/generated/google/apis/partners_v2/classes.rb +1466 -1466
  241. data/generated/google/apis/partners_v2/representations.rb +371 -371
  242. data/generated/google/apis/partners_v2/service.rb +530 -529
  243. data/generated/google/apis/people_v1.rb +4 -4
  244. data/generated/google/apis/people_v1/classes.rb +1009 -1009
  245. data/generated/google/apis/people_v1/representations.rb +249 -249
  246. data/generated/google/apis/people_v1/service.rb +13 -12
  247. data/generated/google/apis/plus_domains_v1/classes.rb +2 -2
  248. data/generated/google/apis/plus_domains_v1/representations.rb +2 -2
  249. data/generated/google/apis/plus_domains_v1/service.rb +1 -0
  250. data/generated/google/apis/plus_v1/service.rb +1 -0
  251. data/generated/google/apis/prediction_v1_6/classes.rb +9 -9
  252. data/generated/google/apis/prediction_v1_6/representations.rb +9 -9
  253. data/generated/google/apis/prediction_v1_6/service.rb +1 -0
  254. data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +221 -221
  255. data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +55 -55
  256. data/generated/google/apis/proximitybeacon_v1beta1/service.rb +378 -377
  257. data/generated/google/apis/pubsub_v1/classes.rb +99 -99
  258. data/generated/google/apis/pubsub_v1/representations.rb +25 -25
  259. data/generated/google/apis/pubsub_v1/service.rb +236 -235
  260. data/generated/google/apis/qpx_express_v1/service.rb +1 -0
  261. data/generated/google/apis/replicapool_v1beta2/classes.rb +3 -3
  262. data/generated/google/apis/replicapool_v1beta2/representations.rb +3 -3
  263. data/generated/google/apis/replicapool_v1beta2/service.rb +1 -0
  264. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +2 -2
  265. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +2 -2
  266. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -0
  267. data/generated/google/apis/reseller_v1/classes.rb +5 -5
  268. data/generated/google/apis/reseller_v1/representations.rb +5 -5
  269. data/generated/google/apis/reseller_v1/service.rb +1 -0
  270. data/generated/google/apis/resourceviews_v1beta2/classes.rb +2 -2
  271. data/generated/google/apis/resourceviews_v1beta2/representations.rb +2 -2
  272. data/generated/google/apis/resourceviews_v1beta2/service.rb +1 -0
  273. data/generated/google/apis/runtimeconfig_v1.rb +3 -3
  274. data/generated/google/apis/runtimeconfig_v1/classes.rb +28 -28
  275. data/generated/google/apis/runtimeconfig_v1/representations.rb +3 -3
  276. data/generated/google/apis/runtimeconfig_v1/service.rb +53 -52
  277. data/generated/google/apis/script_v1.rb +18 -18
  278. data/generated/google/apis/script_v1/classes.rb +84 -84
  279. data/generated/google/apis/script_v1/representations.rb +18 -18
  280. data/generated/google/apis/script_v1/service.rb +11 -10
  281. data/generated/google/apis/searchconsole_v1/classes.rb +75 -75
  282. data/generated/google/apis/searchconsole_v1/representations.rb +32 -32
  283. data/generated/google/apis/searchconsole_v1/service.rb +11 -10
  284. data/generated/google/apis/servicecontrol_v1/classes.rb +582 -582
  285. data/generated/google/apis/servicecontrol_v1/representations.rb +113 -113
  286. data/generated/google/apis/servicecontrol_v1/service.rb +71 -70
  287. data/generated/google/apis/servicemanagement_v1.rb +3 -3
  288. data/generated/google/apis/servicemanagement_v1/classes.rb +3725 -3725
  289. data/generated/google/apis/servicemanagement_v1/representations.rb +255 -255
  290. data/generated/google/apis/servicemanagement_v1/service.rb +179 -178
  291. data/generated/google/apis/serviceuser_v1.rb +3 -3
  292. data/generated/google/apis/serviceuser_v1/classes.rb +2845 -2845
  293. data/generated/google/apis/serviceuser_v1/representations.rb +228 -228
  294. data/generated/google/apis/serviceuser_v1/service.rb +47 -46
  295. data/generated/google/apis/sheets_v4.rb +1 -1
  296. data/generated/google/apis/sheets_v4/classes.rb +4456 -4456
  297. data/generated/google/apis/sheets_v4/representations.rb +859 -859
  298. data/generated/google/apis/sheets_v4/service.rb +180 -179
  299. data/generated/google/apis/site_verification_v1/service.rb +1 -0
  300. data/generated/google/apis/slides_v1.rb +1 -1
  301. data/generated/google/apis/slides_v1/classes.rb +2856 -2856
  302. data/generated/google/apis/slides_v1/representations.rb +683 -683
  303. data/generated/google/apis/slides_v1/service.rb +27 -26
  304. data/generated/google/apis/sourcerepo_v1/classes.rb +281 -281
  305. data/generated/google/apis/sourcerepo_v1/representations.rb +79 -79
  306. data/generated/google/apis/sourcerepo_v1/service.rb +112 -111
  307. data/generated/google/apis/spanner_v1/classes.rb +2177 -2177
  308. data/generated/google/apis/spanner_v1/representations.rb +325 -325
  309. data/generated/google/apis/spanner_v1/service.rb +374 -373
  310. data/generated/google/apis/speech_v1beta1/classes.rb +197 -197
  311. data/generated/google/apis/speech_v1beta1/representations.rb +36 -36
  312. data/generated/google/apis/speech_v1beta1/service.rb +27 -26
  313. data/generated/google/apis/sqladmin_v1beta4/classes.rb +14 -14
  314. data/generated/google/apis/sqladmin_v1beta4/representations.rb +14 -14
  315. data/generated/google/apis/sqladmin_v1beta4/service.rb +3 -2
  316. data/generated/google/apis/storage_v1.rb +1 -1
  317. data/generated/google/apis/storage_v1/classes.rb +11 -11
  318. data/generated/google/apis/storage_v1/representations.rb +11 -11
  319. data/generated/google/apis/storage_v1/service.rb +65 -64
  320. data/generated/google/apis/storagetransfer_v1/classes.rb +239 -239
  321. data/generated/google/apis/storagetransfer_v1/representations.rb +79 -79
  322. data/generated/google/apis/storagetransfer_v1/service.rb +133 -132
  323. data/generated/google/apis/surveys_v2/classes.rb +4 -4
  324. data/generated/google/apis/surveys_v2/representations.rb +4 -4
  325. data/generated/google/apis/surveys_v2/service.rb +1 -0
  326. data/generated/google/apis/tagmanager_v1/classes.rb +7 -7
  327. data/generated/google/apis/tagmanager_v1/representations.rb +7 -7
  328. data/generated/google/apis/tagmanager_v1/service.rb +1 -0
  329. data/generated/google/apis/tagmanager_v2/classes.rb +6 -6
  330. data/generated/google/apis/tagmanager_v2/representations.rb +6 -6
  331. data/generated/google/apis/tagmanager_v2/service.rb +1 -0
  332. data/generated/google/apis/taskqueue_v1beta2/classes.rb +5 -5
  333. data/generated/google/apis/taskqueue_v1beta2/representations.rb +5 -5
  334. data/generated/google/apis/taskqueue_v1beta2/service.rb +1 -0
  335. data/generated/google/apis/tasks_v1/service.rb +3 -2
  336. data/generated/google/apis/toolresults_v1beta3.rb +1 -1
  337. data/generated/google/apis/toolresults_v1beta3/classes.rb +4 -4
  338. data/generated/google/apis/toolresults_v1beta3/representations.rb +4 -4
  339. data/generated/google/apis/toolresults_v1beta3/service.rb +1 -0
  340. data/generated/google/apis/tracing_v1/classes.rb +421 -421
  341. data/generated/google/apis/tracing_v1/representations.rb +86 -86
  342. data/generated/google/apis/tracing_v1/service.rb +60 -59
  343. data/generated/google/apis/translate_v2/service.rb +1 -0
  344. data/generated/google/apis/urlshortener_v1/classes.rb +3 -3
  345. data/generated/google/apis/urlshortener_v1/representations.rb +3 -3
  346. data/generated/google/apis/urlshortener_v1/service.rb +1 -0
  347. data/generated/google/apis/vision_v1/classes.rb +1290 -1290
  348. data/generated/google/apis/vision_v1/representations.rb +184 -184
  349. data/generated/google/apis/vision_v1/service.rb +11 -10
  350. data/generated/google/apis/webfonts_v1/service.rb +1 -0
  351. data/generated/google/apis/webmasters_v3/classes.rb +5 -5
  352. data/generated/google/apis/webmasters_v3/representations.rb +5 -5
  353. data/generated/google/apis/webmasters_v3/service.rb +1 -0
  354. data/generated/google/apis/youtube_analytics_v1/classes.rb +1 -1
  355. data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -1
  356. data/generated/google/apis/youtube_analytics_v1/service.rb +1 -0
  357. data/generated/google/apis/youtube_partner_v1/classes.rb +13 -13
  358. data/generated/google/apis/youtube_partner_v1/representations.rb +13 -13
  359. data/generated/google/apis/youtube_partner_v1/service.rb +1 -0
  360. data/generated/google/apis/youtube_v3/classes.rb +31 -31
  361. data/generated/google/apis/youtube_v3/representations.rb +31 -31
  362. data/generated/google/apis/youtube_v3/service.rb +2 -1
  363. data/generated/google/apis/youtubereporting_v1.rb +4 -4
  364. data/generated/google/apis/youtubereporting_v1/classes.rb +73 -73
  365. data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
  366. data/generated/google/apis/youtubereporting_v1/service.rb +77 -76
  367. data/google-api-client.gemspec +4 -6
  368. data/lib/google/apis/core/api_command.rb +8 -3
  369. data/lib/google/apis/core/base_service.rb +47 -18
  370. data/lib/google/apis/core/batch.rb +13 -18
  371. data/lib/google/apis/core/composite_io.rb +97 -0
  372. data/lib/google/apis/core/download.rb +24 -20
  373. data/lib/google/apis/core/http_command.rb +49 -38
  374. data/lib/google/apis/core/json_representation.rb +5 -1
  375. data/lib/google/apis/core/multipart.rb +43 -95
  376. data/lib/google/apis/core/upload.rb +59 -84
  377. data/lib/google/apis/generator/model.rb +2 -0
  378. data/lib/google/apis/generator/templates/_representation.tmpl +1 -1
  379. data/lib/google/apis/generator/templates/service.rb.tmpl +1 -0
  380. data/lib/google/apis/options.rb +24 -12
  381. data/lib/google/apis/version.rb +1 -1
  382. data/samples/web/Gemfile +0 -1
  383. metadata +39 -37
  384. data/lib/google/apis/core/http_client_adapter.rb +0 -82
  385. data/third_party/hurley_patches.rb +0 -103
@@ -22,6 +22,18 @@ module Google
22
22
  module Apis
23
23
  module DataprocV1
24
24
 
25
+ class JobReference
26
+ class Representation < Google::Apis::Core::JsonRepresentation; end
27
+
28
+ include Google::Apis::Core::JsonObjectSupport
29
+ end
30
+
31
+ class SubmitJobRequest
32
+ class Representation < Google::Apis::Core::JsonRepresentation; end
33
+
34
+ include Google::Apis::Core::JsonObjectSupport
35
+ end
36
+
25
37
  class Status
26
38
  class Representation < Google::Apis::Core::JsonRepresentation; end
27
39
 
@@ -82,13 +94,13 @@ module Google
82
94
  include Google::Apis::Core::JsonObjectSupport
83
95
  end
84
96
 
85
- class SoftwareConfig
97
+ class JobPlacement
86
98
  class Representation < Google::Apis::Core::JsonRepresentation; end
87
99
 
88
100
  include Google::Apis::Core::JsonObjectSupport
89
101
  end
90
102
 
91
- class JobPlacement
103
+ class SoftwareConfig
92
104
  class Representation < Google::Apis::Core::JsonRepresentation; end
93
105
 
94
106
  include Google::Apis::Core::JsonObjectSupport
@@ -142,19 +154,19 @@ module Google
142
154
  include Google::Apis::Core::JsonObjectSupport
143
155
  end
144
156
 
145
- class QueryList
157
+ class HadoopJob
146
158
  class Representation < Google::Apis::Core::JsonRepresentation; end
147
159
 
148
160
  include Google::Apis::Core::JsonObjectSupport
149
161
  end
150
162
 
151
- class YarnApplication
163
+ class QueryList
152
164
  class Representation < Google::Apis::Core::JsonRepresentation; end
153
165
 
154
166
  include Google::Apis::Core::JsonObjectSupport
155
167
  end
156
168
 
157
- class HadoopJob
169
+ class YarnApplication
158
170
  class Representation < Google::Apis::Core::JsonRepresentation; end
159
171
 
160
172
  include Google::Apis::Core::JsonObjectSupport
@@ -251,15 +263,19 @@ module Google
251
263
  end
252
264
 
253
265
  class JobReference
254
- class Representation < Google::Apis::Core::JsonRepresentation; end
255
-
256
- include Google::Apis::Core::JsonObjectSupport
266
+ # @private
267
+ class Representation < Google::Apis::Core::JsonRepresentation
268
+ property :project_id, as: 'projectId'
269
+ property :job_id, as: 'jobId'
270
+ end
257
271
  end
258
272
 
259
273
  class SubmitJobRequest
260
- class Representation < Google::Apis::Core::JsonRepresentation; end
274
+ # @private
275
+ class Representation < Google::Apis::Core::JsonRepresentation
276
+ property :job, as: 'job', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation
261
277
 
262
- include Google::Apis::Core::JsonObjectSupport
278
+ end
263
279
  end
264
280
 
265
281
  class Status
@@ -274,17 +290,17 @@ module Google
274
290
  class InstanceGroupConfig
275
291
  # @private
276
292
  class Representation < Google::Apis::Core::JsonRepresentation
293
+ collection :instance_names, as: 'instanceNames'
277
294
  collection :accelerators, as: 'accelerators', class: Google::Apis::DataprocV1::AcceleratorConfig, decorator: Google::Apis::DataprocV1::AcceleratorConfig::Representation
278
295
 
279
296
  property :num_instances, as: 'numInstances'
280
297
  property :disk_config, as: 'diskConfig', class: Google::Apis::DataprocV1::DiskConfig, decorator: Google::Apis::DataprocV1::DiskConfig::Representation
281
298
 
282
299
  property :is_preemptible, as: 'isPreemptible'
283
- property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1::ManagedGroupConfig, decorator: Google::Apis::DataprocV1::ManagedGroupConfig::Representation
284
-
285
300
  property :machine_type_uri, as: 'machineTypeUri'
286
301
  property :image_uri, as: 'imageUri'
287
- collection :instance_names, as: 'instanceNames'
302
+ property :managed_group_config, as: 'managedGroupConfig', class: Google::Apis::DataprocV1::ManagedGroupConfig, decorator: Google::Apis::DataprocV1::ManagedGroupConfig::Representation
303
+
288
304
  end
289
305
  end
290
306
 
@@ -321,9 +337,9 @@ module Google
321
337
  class SparkSqlJob
322
338
  # @private
323
339
  class Representation < Google::Apis::Core::JsonRepresentation
324
- property :query_file_uri, as: 'queryFileUri'
325
340
  property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
326
341
 
342
+ property :query_file_uri, as: 'queryFileUri'
327
343
  hash :script_variables, as: 'scriptVariables'
328
344
  collection :jar_file_uris, as: 'jarFileUris'
329
345
  property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
@@ -353,9 +369,9 @@ module Google
353
369
  class ListOperationsResponse
354
370
  # @private
355
371
  class Representation < Google::Apis::Core::JsonRepresentation
372
+ property :next_page_token, as: 'nextPageToken'
356
373
  collection :operations, as: 'operations', class: Google::Apis::DataprocV1::Operation, decorator: Google::Apis::DataprocV1::Operation::Representation
357
374
 
358
- property :next_page_token, as: 'nextPageToken'
359
375
  end
360
376
  end
361
377
 
@@ -380,44 +396,44 @@ module Google
380
396
  end
381
397
  end
382
398
 
383
- class SoftwareConfig
399
+ class JobPlacement
384
400
  # @private
385
401
  class Representation < Google::Apis::Core::JsonRepresentation
386
- property :image_version, as: 'imageVersion'
387
- hash :properties, as: 'properties'
402
+ property :cluster_name, as: 'clusterName'
403
+ property :cluster_uuid, as: 'clusterUuid'
388
404
  end
389
405
  end
390
406
 
391
- class JobPlacement
407
+ class SoftwareConfig
392
408
  # @private
393
409
  class Representation < Google::Apis::Core::JsonRepresentation
394
- property :cluster_name, as: 'clusterName'
395
- property :cluster_uuid, as: 'clusterUuid'
410
+ property :image_version, as: 'imageVersion'
411
+ hash :properties, as: 'properties'
396
412
  end
397
413
  end
398
414
 
399
415
  class PigJob
400
416
  # @private
401
417
  class Representation < Google::Apis::Core::JsonRepresentation
402
- property :continue_on_failure, as: 'continueOnFailure'
403
- property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
404
-
405
- property :query_file_uri, as: 'queryFileUri'
406
418
  collection :jar_file_uris, as: 'jarFileUris'
407
419
  hash :script_variables, as: 'scriptVariables'
408
420
  property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
409
421
 
410
422
  hash :properties, as: 'properties'
423
+ property :continue_on_failure, as: 'continueOnFailure'
424
+ property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
425
+
426
+ property :query_file_uri, as: 'queryFileUri'
411
427
  end
412
428
  end
413
429
 
414
430
  class ClusterStatus
415
431
  # @private
416
432
  class Representation < Google::Apis::Core::JsonRepresentation
433
+ property :state, as: 'state'
417
434
  property :state_start_time, as: 'stateStartTime'
418
435
  property :substate, as: 'substate'
419
436
  property :detail, as: 'detail'
420
- property :state, as: 'state'
421
437
  end
422
438
  end
423
439
 
@@ -433,33 +449,21 @@ module Google
433
449
  class SparkJob
434
450
  # @private
435
451
  class Representation < Google::Apis::Core::JsonRepresentation
436
- property :main_class, as: 'mainClass'
437
- collection :archive_uris, as: 'archiveUris'
438
- property :main_jar_file_uri, as: 'mainJarFileUri'
439
452
  collection :jar_file_uris, as: 'jarFileUris'
440
453
  property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
441
454
 
442
455
  hash :properties, as: 'properties'
443
456
  collection :args, as: 'args'
444
457
  collection :file_uris, as: 'fileUris'
458
+ property :main_class, as: 'mainClass'
459
+ collection :archive_uris, as: 'archiveUris'
460
+ property :main_jar_file_uri, as: 'mainJarFileUri'
445
461
  end
446
462
  end
447
463
 
448
464
  class Job
449
465
  # @private
450
466
  class Representation < Google::Apis::Core::JsonRepresentation
451
- collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation
452
-
453
- property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation
454
-
455
- property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation
456
-
457
- property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation
458
-
459
- property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
460
-
461
- property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation
462
-
463
467
  property :driver_control_files_uri, as: 'driverControlFilesUri'
464
468
  property :scheduling, as: 'scheduling', class: Google::Apis::DataprocV1::JobScheduling, decorator: Google::Apis::DataprocV1::JobScheduling::Representation
465
469
 
@@ -471,9 +475,21 @@ module Google
471
475
  property :driver_output_resource_uri, as: 'driverOutputResourceUri'
472
476
  collection :status_history, as: 'statusHistory', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
473
477
 
478
+ property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation
479
+
474
480
  property :spark_job, as: 'sparkJob', class: Google::Apis::DataprocV1::SparkJob, decorator: Google::Apis::DataprocV1::SparkJob::Representation
475
481
 
476
- property :spark_sql_job, as: 'sparkSqlJob', class: Google::Apis::DataprocV1::SparkSqlJob, decorator: Google::Apis::DataprocV1::SparkSqlJob::Representation
482
+ collection :yarn_applications, as: 'yarnApplications', class: Google::Apis::DataprocV1::YarnApplication, decorator: Google::Apis::DataprocV1::YarnApplication::Representation
483
+
484
+ property :pyspark_job, as: 'pysparkJob', class: Google::Apis::DataprocV1::PySparkJob, decorator: Google::Apis::DataprocV1::PySparkJob::Representation
485
+
486
+ property :reference, as: 'reference', class: Google::Apis::DataprocV1::JobReference, decorator: Google::Apis::DataprocV1::JobReference::Representation
487
+
488
+ property :hadoop_job, as: 'hadoopJob', class: Google::Apis::DataprocV1::HadoopJob, decorator: Google::Apis::DataprocV1::HadoopJob::Representation
489
+
490
+ property :status, as: 'status', class: Google::Apis::DataprocV1::JobStatus, decorator: Google::Apis::DataprocV1::JobStatus::Representation
491
+
492
+ property :placement, as: 'placement', class: Google::Apis::DataprocV1::JobPlacement, decorator: Google::Apis::DataprocV1::JobPlacement::Representation
477
493
 
478
494
  end
479
495
  end
@@ -481,10 +497,10 @@ module Google
481
497
  class JobStatus
482
498
  # @private
483
499
  class Representation < Google::Apis::Core::JsonRepresentation
484
- property :state, as: 'state'
485
- property :details, as: 'details'
486
500
  property :state_start_time, as: 'stateStartTime'
487
501
  property :substate, as: 'substate'
502
+ property :state, as: 'state'
503
+ property :details, as: 'details'
488
504
  end
489
505
  end
490
506
 
@@ -506,6 +522,21 @@ module Google
506
522
  end
507
523
  end
508
524
 
525
+ class HadoopJob
526
+ # @private
527
+ class Representation < Google::Apis::Core::JsonRepresentation
528
+ hash :properties, as: 'properties'
529
+ collection :args, as: 'args'
530
+ collection :file_uris, as: 'fileUris'
531
+ property :main_class, as: 'mainClass'
532
+ collection :archive_uris, as: 'archiveUris'
533
+ property :main_jar_file_uri, as: 'mainJarFileUri'
534
+ collection :jar_file_uris, as: 'jarFileUris'
535
+ property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
536
+
537
+ end
538
+ end
539
+
509
540
  class QueryList
510
541
  # @private
511
542
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -523,21 +554,6 @@ module Google
523
554
  end
524
555
  end
525
556
 
526
- class HadoopJob
527
- # @private
528
- class Representation < Google::Apis::Core::JsonRepresentation
529
- collection :jar_file_uris, as: 'jarFileUris'
530
- property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
531
-
532
- hash :properties, as: 'properties'
533
- collection :args, as: 'args'
534
- collection :file_uris, as: 'fileUris'
535
- property :main_class, as: 'mainClass'
536
- collection :archive_uris, as: 'archiveUris'
537
- property :main_jar_file_uri, as: 'mainJarFileUri'
538
- end
539
- end
540
-
541
557
  class DiagnoseClusterRequest
542
558
  # @private
543
559
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -547,14 +563,15 @@ module Google
547
563
  class DiskConfig
548
564
  # @private
549
565
  class Representation < Google::Apis::Core::JsonRepresentation
550
- property :num_local_ssds, as: 'numLocalSsds'
551
566
  property :boot_disk_size_gb, as: 'bootDiskSizeGb'
567
+ property :num_local_ssds, as: 'numLocalSsds'
552
568
  end
553
569
  end
554
570
 
555
571
  class ClusterOperationMetadata
556
572
  # @private
557
573
  class Representation < Google::Apis::Core::JsonRepresentation
574
+ collection :warnings, as: 'warnings'
558
575
  hash :labels, as: 'labels'
559
576
  property :status, as: 'status', class: Google::Apis::DataprocV1::ClusterOperationStatus, decorator: Google::Apis::DataprocV1::ClusterOperationStatus::Representation
560
577
 
@@ -564,7 +581,6 @@ module Google
564
581
  property :cluster_uuid, as: 'clusterUuid'
565
582
  property :operation_type, as: 'operationType'
566
583
  property :description, as: 'description'
567
- collection :warnings, as: 'warnings'
568
584
  end
569
585
  end
570
586
 
@@ -578,9 +594,9 @@ module Google
578
594
  # @private
579
595
  class Representation < Google::Apis::Core::JsonRepresentation
580
596
  property :continue_on_failure, as: 'continueOnFailure'
597
+ property :query_file_uri, as: 'queryFileUri'
581
598
  property :query_list, as: 'queryList', class: Google::Apis::DataprocV1::QueryList, decorator: Google::Apis::DataprocV1::QueryList::Representation
582
599
 
583
- property :query_file_uri, as: 'queryFileUri'
584
600
  collection :jar_file_uris, as: 'jarFileUris'
585
601
  hash :script_variables, as: 'scriptVariables'
586
602
  hash :properties, as: 'properties'
@@ -597,9 +613,6 @@ module Google
597
613
  class ClusterConfig
598
614
  # @private
599
615
  class Representation < Google::Apis::Core::JsonRepresentation
600
- collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation
601
-
602
- property :config_bucket, as: 'configBucket'
603
616
  property :worker_config, as: 'workerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
604
617
 
605
618
  property :gce_cluster_config, as: 'gceClusterConfig', class: Google::Apis::DataprocV1::GceClusterConfig, decorator: Google::Apis::DataprocV1::GceClusterConfig::Representation
@@ -610,29 +623,32 @@ module Google
610
623
 
611
624
  property :secondary_worker_config, as: 'secondaryWorkerConfig', class: Google::Apis::DataprocV1::InstanceGroupConfig, decorator: Google::Apis::DataprocV1::InstanceGroupConfig::Representation
612
625
 
626
+ collection :initialization_actions, as: 'initializationActions', class: Google::Apis::DataprocV1::NodeInitializationAction, decorator: Google::Apis::DataprocV1::NodeInitializationAction::Representation
627
+
628
+ property :config_bucket, as: 'configBucket'
613
629
  end
614
630
  end
615
631
 
616
632
  class PySparkJob
617
633
  # @private
618
634
  class Representation < Google::Apis::Core::JsonRepresentation
619
- collection :jar_file_uris, as: 'jarFileUris'
620
- property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
621
-
622
635
  hash :properties, as: 'properties'
623
636
  collection :args, as: 'args'
624
637
  collection :file_uris, as: 'fileUris'
625
638
  collection :python_file_uris, as: 'pythonFileUris'
626
639
  property :main_python_file_uri, as: 'mainPythonFileUri'
627
640
  collection :archive_uris, as: 'archiveUris'
641
+ collection :jar_file_uris, as: 'jarFileUris'
642
+ property :logging_config, as: 'loggingConfig', class: Google::Apis::DataprocV1::LoggingConfig, decorator: Google::Apis::DataprocV1::LoggingConfig::Representation
643
+
628
644
  end
629
645
  end
630
646
 
631
647
  class GceClusterConfig
632
648
  # @private
633
649
  class Representation < Google::Apis::Core::JsonRepresentation
634
- hash :metadata, as: 'metadata'
635
650
  property :internal_ip_only, as: 'internalIpOnly'
651
+ hash :metadata, as: 'metadata'
636
652
  collection :service_account_scopes, as: 'serviceAccountScopes'
637
653
  collection :tags, as: 'tags'
638
654
  property :service_account, as: 'serviceAccount'
@@ -645,8 +661,8 @@ module Google
645
661
  class ClusterMetrics
646
662
  # @private
647
663
  class Representation < Google::Apis::Core::JsonRepresentation
648
- hash :hdfs_metrics, as: 'hdfsMetrics'
649
664
  hash :yarn_metrics, as: 'yarnMetrics'
665
+ hash :hdfs_metrics, as: 'hdfsMetrics'
650
666
  end
651
667
  end
652
668
 
@@ -675,38 +691,22 @@ module Google
675
691
  class Operation
676
692
  # @private
677
693
  class Representation < Google::Apis::Core::JsonRepresentation
678
- property :error, as: 'error', class: Google::Apis::DataprocV1::Status, decorator: Google::Apis::DataprocV1::Status::Representation
679
-
680
- hash :metadata, as: 'metadata'
681
694
  property :done, as: 'done'
682
695
  hash :response, as: 'response'
683
696
  property :name, as: 'name'
697
+ property :error, as: 'error', class: Google::Apis::DataprocV1::Status, decorator: Google::Apis::DataprocV1::Status::Representation
698
+
699
+ hash :metadata, as: 'metadata'
684
700
  end
685
701
  end
686
702
 
687
703
  class OperationStatus
688
704
  # @private
689
705
  class Representation < Google::Apis::Core::JsonRepresentation
690
- property :inner_state, as: 'innerState'
691
- property :state_start_time, as: 'stateStartTime'
692
706
  property :state, as: 'state'
693
707
  property :details, as: 'details'
694
- end
695
- end
696
-
697
- class JobReference
698
- # @private
699
- class Representation < Google::Apis::Core::JsonRepresentation
700
- property :project_id, as: 'projectId'
701
- property :job_id, as: 'jobId'
702
- end
703
- end
704
-
705
- class SubmitJobRequest
706
- # @private
707
- class Representation < Google::Apis::Core::JsonRepresentation
708
- property :job, as: 'job', class: Google::Apis::DataprocV1::Job, decorator: Google::Apis::DataprocV1::Job::Representation
709
-
708
+ property :inner_state, as: 'innerState'
709
+ property :state_start_time, as: 'stateStartTime'
710
710
  end
711
711
  end
712
712
  end
@@ -32,141 +32,164 @@ module Google
32
32
  #
33
33
  # @see https://cloud.google.com/dataproc/
34
34
  class DataprocService < Google::Apis::Core::BaseService
35
- # @return [String]
36
- # Available to use for quota purposes for server-side applications. Can be any
37
- # arbitrary string assigned to a user, but should not exceed 40 characters.
38
- attr_accessor :quota_user
39
-
40
35
  # @return [String]
41
36
  # API key. Your API key identifies your project and provides you with API access,
42
37
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
43
38
  attr_accessor :key
44
39
 
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
45
  def initialize
46
46
  super('https://dataproc.googleapis.com/', '')
47
+ @batch_path = 'batch'
47
48
  end
48
49
 
49
- # Starts asynchronous cancellation on a long-running operation. The server makes
50
- # a best effort to cancel the operation, but success is not guaranteed. If the
51
- # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
52
- # Clients can use Operations.GetOperation or other methods to check whether the
53
- # cancellation succeeded or whether the operation completed despite cancellation.
54
- # On successful cancellation, the operation is not deleted; instead, it becomes
55
- # an operation with an Operation.error value with a google.rpc.Status.code of 1,
56
- # corresponding to Code.CANCELLED.
57
- # @param [String] name
58
- # The name of the operation resource to be cancelled.
50
+ # Deletes a cluster in a project.
51
+ # @param [String] project_id
52
+ # Required The ID of the Google Cloud Platform project that the cluster belongs
53
+ # to.
54
+ # @param [String] region
55
+ # Required The Cloud Dataproc region in which to handle the request.
56
+ # @param [String] cluster_name
57
+ # Required The cluster name.
58
+ # @param [String] fields
59
+ # Selector specifying which fields to include in a partial response.
59
60
  # @param [String] quota_user
60
61
  # Available to use for quota purposes for server-side applications. Can be any
61
62
  # arbitrary string assigned to a user, but should not exceed 40 characters.
62
- # @param [String] fields
63
- # Selector specifying which fields to include in a partial response.
64
63
  # @param [Google::Apis::RequestOptions] options
65
64
  # Request-specific options
66
65
  #
67
66
  # @yield [result, err] Result & error if block supplied
68
- # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
67
+ # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
69
68
  # @yieldparam err [StandardError] error object if request failed
70
69
  #
71
- # @return [Google::Apis::DataprocV1::Empty]
70
+ # @return [Google::Apis::DataprocV1::Operation]
72
71
  #
73
72
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
74
73
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
75
74
  # @raise [Google::Apis::AuthorizationError] Authorization is required
76
- def cancel_operation(name, quota_user: nil, fields: nil, options: nil, &block)
77
- command = make_simple_command(:post, 'v1/{+name}:cancel', options)
78
- command.response_representation = Google::Apis::DataprocV1::Empty::Representation
79
- command.response_class = Google::Apis::DataprocV1::Empty
80
- command.params['name'] = name unless name.nil?
81
- command.query['quotaUser'] = quota_user unless quota_user.nil?
75
+ def delete_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
76
+ command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
77
+ command.response_representation = Google::Apis::DataprocV1::Operation::Representation
78
+ command.response_class = Google::Apis::DataprocV1::Operation
79
+ command.params['projectId'] = project_id unless project_id.nil?
80
+ command.params['region'] = region unless region.nil?
81
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
82
82
  command.query['fields'] = fields unless fields.nil?
83
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
83
84
  execute_or_queue_command(command, &block)
84
85
  end
85
86
 
86
- # Deletes a long-running operation. This method indicates that the client is no
87
- # longer interested in the operation result. It does not cancel the operation.
88
- # If the server doesn't support this method, it returns google.rpc.Code.
89
- # UNIMPLEMENTED.
90
- # @param [String] name
91
- # The name of the operation resource to be deleted.
87
+ # Gets cluster diagnostic information. After the operation completes, the
88
+ # Operation.response field contains DiagnoseClusterOutputLocation.
89
+ # @param [String] project_id
90
+ # Required The ID of the Google Cloud Platform project that the cluster belongs
91
+ # to.
92
+ # @param [String] region
93
+ # Required The Cloud Dataproc region in which to handle the request.
94
+ # @param [String] cluster_name
95
+ # Required The cluster name.
96
+ # @param [Google::Apis::DataprocV1::DiagnoseClusterRequest] diagnose_cluster_request_object
97
+ # @param [String] fields
98
+ # Selector specifying which fields to include in a partial response.
92
99
  # @param [String] quota_user
93
100
  # Available to use for quota purposes for server-side applications. Can be any
94
101
  # arbitrary string assigned to a user, but should not exceed 40 characters.
95
- # @param [String] fields
96
- # Selector specifying which fields to include in a partial response.
97
102
  # @param [Google::Apis::RequestOptions] options
98
103
  # Request-specific options
99
104
  #
100
105
  # @yield [result, err] Result & error if block supplied
101
- # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
106
+ # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
102
107
  # @yieldparam err [StandardError] error object if request failed
103
108
  #
104
- # @return [Google::Apis::DataprocV1::Empty]
109
+ # @return [Google::Apis::DataprocV1::Operation]
105
110
  #
106
111
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
107
112
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
108
113
  # @raise [Google::Apis::AuthorizationError] Authorization is required
109
- def delete_operation(name, quota_user: nil, fields: nil, options: nil, &block)
110
- command = make_simple_command(:delete, 'v1/{+name}', options)
111
- command.response_representation = Google::Apis::DataprocV1::Empty::Representation
112
- command.response_class = Google::Apis::DataprocV1::Empty
113
- command.params['name'] = name unless name.nil?
114
- command.query['quotaUser'] = quota_user unless quota_user.nil?
114
+ def diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
115
+ command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options)
116
+ command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation
117
+ command.request_object = diagnose_cluster_request_object
118
+ command.response_representation = Google::Apis::DataprocV1::Operation::Representation
119
+ command.response_class = Google::Apis::DataprocV1::Operation
120
+ command.params['projectId'] = project_id unless project_id.nil?
121
+ command.params['region'] = region unless region.nil?
122
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
115
123
  command.query['fields'] = fields unless fields.nil?
124
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
116
125
  execute_or_queue_command(command, &block)
117
126
  end
118
127
 
119
- # Lists operations that match the specified filter in the request. If the server
120
- # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
121
- # below allows API services to override the binding to use different resource
122
- # name schemes, such as users/*/operations.
123
- # @param [String] name
124
- # The name of the operation collection.
125
- # @param [Fixnum] page_size
126
- # The standard list page size.
128
+ # Lists all regions/`region`/clusters in a project.
129
+ # @param [String] project_id
130
+ # Required The ID of the Google Cloud Platform project that the cluster belongs
131
+ # to.
132
+ # @param [String] region
133
+ # Required The Cloud Dataproc region in which to handle the request.
127
134
  # @param [String] filter
128
- # The standard list filter.
135
+ # Optional A filter constraining the clusters to list. Filters are case-
136
+ # sensitive and have the following syntax:field = value AND field = value ...
137
+ # where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is
138
+ # a label key. value can be * to match all values. status.state can be one of
139
+ # the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or
140
+ # UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE
141
+ # contains the DELETING and ERROR states. clusterName is the name of the cluster
142
+ # provided at creation time. Only the logical AND operator is supported; space-
143
+ # separated items are treated as having an implicit AND operator.Example filter:
144
+ # status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND
145
+ # labels.starred = *
129
146
  # @param [String] page_token
130
- # The standard list page token.
147
+ # Optional The standard List page token.
148
+ # @param [Fixnum] page_size
149
+ # Optional The standard List page size.
150
+ # @param [String] fields
151
+ # Selector specifying which fields to include in a partial response.
131
152
  # @param [String] quota_user
132
153
  # Available to use for quota purposes for server-side applications. Can be any
133
154
  # arbitrary string assigned to a user, but should not exceed 40 characters.
134
- # @param [String] fields
135
- # Selector specifying which fields to include in a partial response.
136
155
  # @param [Google::Apis::RequestOptions] options
137
156
  # Request-specific options
138
157
  #
139
158
  # @yield [result, err] Result & error if block supplied
140
- # @yieldparam result [Google::Apis::DataprocV1::ListOperationsResponse] parsed result object
159
+ # @yieldparam result [Google::Apis::DataprocV1::ListClustersResponse] parsed result object
141
160
  # @yieldparam err [StandardError] error object if request failed
142
161
  #
143
- # @return [Google::Apis::DataprocV1::ListOperationsResponse]
162
+ # @return [Google::Apis::DataprocV1::ListClustersResponse]
144
163
  #
145
164
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
146
165
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
147
166
  # @raise [Google::Apis::AuthorizationError] Authorization is required
148
- def list_operations(name, page_size: nil, filter: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
149
- command = make_simple_command(:get, 'v1/{+name}', options)
150
- command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation
151
- command.response_class = Google::Apis::DataprocV1::ListOperationsResponse
152
- command.params['name'] = name unless name.nil?
153
- command.query['pageSize'] = page_size unless page_size.nil?
167
+ def list_clusters(project_id, region, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
168
+ command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options)
169
+ command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation
170
+ command.response_class = Google::Apis::DataprocV1::ListClustersResponse
171
+ command.params['projectId'] = project_id unless project_id.nil?
172
+ command.params['region'] = region unless region.nil?
154
173
  command.query['filter'] = filter unless filter.nil?
155
174
  command.query['pageToken'] = page_token unless page_token.nil?
156
- command.query['quotaUser'] = quota_user unless quota_user.nil?
175
+ command.query['pageSize'] = page_size unless page_size.nil?
157
176
  command.query['fields'] = fields unless fields.nil?
177
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
158
178
  execute_or_queue_command(command, &block)
159
179
  end
160
180
 
161
- # Gets the latest state of a long-running operation. Clients can use this method
162
- # to poll the operation result at intervals as recommended by the API service.
163
- # @param [String] name
164
- # The name of the operation resource.
181
+ # Creates a cluster in a project.
182
+ # @param [String] project_id
183
+ # Required The ID of the Google Cloud Platform project that the cluster belongs
184
+ # to.
185
+ # @param [String] region
186
+ # Required The Cloud Dataproc region in which to handle the request.
187
+ # @param [Google::Apis::DataprocV1::Cluster] cluster_object
188
+ # @param [String] fields
189
+ # Selector specifying which fields to include in a partial response.
165
190
  # @param [String] quota_user
166
191
  # Available to use for quota purposes for server-side applications. Can be any
167
192
  # arbitrary string assigned to a user, but should not exceed 40 characters.
168
- # @param [String] fields
169
- # Selector specifying which fields to include in a partial response.
170
193
  # @param [Google::Apis::RequestOptions] options
171
194
  # Request-specific options
172
195
  #
@@ -179,545 +202,523 @@ module Google
179
202
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
180
203
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
181
204
  # @raise [Google::Apis::AuthorizationError] Authorization is required
182
- def get_operation(name, quota_user: nil, fields: nil, options: nil, &block)
183
- command = make_simple_command(:get, 'v1/{+name}', options)
205
+ def create_cluster(project_id, region, cluster_object = nil, fields: nil, quota_user: nil, options: nil, &block)
206
+ command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters', options)
207
+ command.request_representation = Google::Apis::DataprocV1::Cluster::Representation
208
+ command.request_object = cluster_object
184
209
  command.response_representation = Google::Apis::DataprocV1::Operation::Representation
185
210
  command.response_class = Google::Apis::DataprocV1::Operation
186
- command.params['name'] = name unless name.nil?
187
- command.query['quotaUser'] = quota_user unless quota_user.nil?
211
+ command.params['projectId'] = project_id unless project_id.nil?
212
+ command.params['region'] = region unless region.nil?
188
213
  command.query['fields'] = fields unless fields.nil?
214
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
189
215
  execute_or_queue_command(command, &block)
190
216
  end
191
217
 
192
- # Starts a job cancellation request. To access the job resource after
193
- # cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get.
218
+ # Updates a cluster in a project.
194
219
  # @param [String] project_id
195
- # Required The ID of the Google Cloud Platform project that the job belongs to.
220
+ # Required The ID of the Google Cloud Platform project the cluster belongs to.
196
221
  # @param [String] region
197
222
  # Required The Cloud Dataproc region in which to handle the request.
198
- # @param [String] job_id
199
- # Required The job ID.
200
- # @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_request_object
223
+ # @param [String] cluster_name
224
+ # Required The cluster name.
225
+ # @param [Google::Apis::DataprocV1::Cluster] cluster_object
226
+ # @param [String] update_mask
227
+ # Required Specifies the path, relative to <code>Cluster</code>, of the field to
228
+ # update. For example, to change the number of workers in a cluster to 5, the <
229
+ # code>update_mask</code> parameter would be specified as <code>config.
230
+ # worker_config.num_instances</code>, and the PATCH request body would specify
231
+ # the new value, as follows:
232
+ # `
233
+ # "config":`
234
+ # "workerConfig":`
235
+ # "numInstances":"5"
236
+ # `
237
+ # `
238
+ # `
239
+ # Similarly, to change the number of preemptible workers in a cluster to 5, the <
240
+ # code>update_mask</code> parameter would be <code>config.
241
+ # secondary_worker_config.num_instances</code>, and the PATCH request body would
242
+ # be set as follows:
243
+ # `
244
+ # "config":`
245
+ # "secondaryWorkerConfig":`
246
+ # "numInstances":"5"
247
+ # `
248
+ # `
249
+ # `
250
+ # <strong>Note:</strong> Currently, <code>config.worker_config.num_instances</
251
+ # code> and <code>config.secondary_worker_config.num_instances</code> are the
252
+ # only fields that can be updated.
253
+ # @param [String] fields
254
+ # Selector specifying which fields to include in a partial response.
201
255
  # @param [String] quota_user
202
256
  # Available to use for quota purposes for server-side applications. Can be any
203
257
  # arbitrary string assigned to a user, but should not exceed 40 characters.
204
- # @param [String] fields
205
- # Selector specifying which fields to include in a partial response.
206
258
  # @param [Google::Apis::RequestOptions] options
207
259
  # Request-specific options
208
260
  #
209
261
  # @yield [result, err] Result & error if block supplied
210
- # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
262
+ # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
211
263
  # @yieldparam err [StandardError] error object if request failed
212
264
  #
213
- # @return [Google::Apis::DataprocV1::Job]
265
+ # @return [Google::Apis::DataprocV1::Operation]
214
266
  #
215
267
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
216
268
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
217
269
  # @raise [Google::Apis::AuthorizationError] Authorization is required
218
- def cancel_job(project_id, region, job_id, cancel_job_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
219
- command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options)
220
- command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation
221
- command.request_object = cancel_job_request_object
222
- command.response_representation = Google::Apis::DataprocV1::Job::Representation
223
- command.response_class = Google::Apis::DataprocV1::Job
270
+ def patch_cluster(project_id, region, cluster_name, cluster_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
271
+ command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
272
+ command.request_representation = Google::Apis::DataprocV1::Cluster::Representation
273
+ command.request_object = cluster_object
274
+ command.response_representation = Google::Apis::DataprocV1::Operation::Representation
275
+ command.response_class = Google::Apis::DataprocV1::Operation
224
276
  command.params['projectId'] = project_id unless project_id.nil?
225
277
  command.params['region'] = region unless region.nil?
226
- command.params['jobId'] = job_id unless job_id.nil?
227
- command.query['quotaUser'] = quota_user unless quota_user.nil?
278
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
279
+ command.query['updateMask'] = update_mask unless update_mask.nil?
228
280
  command.query['fields'] = fields unless fields.nil?
281
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
229
282
  execute_or_queue_command(command, &block)
230
283
  end
231
284
 
232
- # Gets the resource representation for a job in a project.
285
+ # Gets the resource representation for a cluster in a project.
233
286
  # @param [String] project_id
234
- # Required The ID of the Google Cloud Platform project that the job belongs to.
287
+ # Required The ID of the Google Cloud Platform project that the cluster belongs
288
+ # to.
235
289
  # @param [String] region
236
290
  # Required The Cloud Dataproc region in which to handle the request.
237
- # @param [String] job_id
238
- # Required The job ID.
291
+ # @param [String] cluster_name
292
+ # Required The cluster name.
293
+ # @param [String] fields
294
+ # Selector specifying which fields to include in a partial response.
239
295
  # @param [String] quota_user
240
296
  # Available to use for quota purposes for server-side applications. Can be any
241
297
  # arbitrary string assigned to a user, but should not exceed 40 characters.
242
- # @param [String] fields
243
- # Selector specifying which fields to include in a partial response.
244
298
  # @param [Google::Apis::RequestOptions] options
245
299
  # Request-specific options
246
300
  #
247
301
  # @yield [result, err] Result & error if block supplied
248
- # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
302
+ # @yieldparam result [Google::Apis::DataprocV1::Cluster] parsed result object
249
303
  # @yieldparam err [StandardError] error object if request failed
250
304
  #
251
- # @return [Google::Apis::DataprocV1::Job]
305
+ # @return [Google::Apis::DataprocV1::Cluster]
252
306
  #
253
307
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
254
308
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
255
309
  # @raise [Google::Apis::AuthorizationError] Authorization is required
256
- def get_job(project_id, region, job_id, quota_user: nil, fields: nil, options: nil, &block)
257
- command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
258
- command.response_representation = Google::Apis::DataprocV1::Job::Representation
259
- command.response_class = Google::Apis::DataprocV1::Job
310
+ def get_cluster(project_id, region, cluster_name, fields: nil, quota_user: nil, options: nil, &block)
311
+ command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
312
+ command.response_representation = Google::Apis::DataprocV1::Cluster::Representation
313
+ command.response_class = Google::Apis::DataprocV1::Cluster
260
314
  command.params['projectId'] = project_id unless project_id.nil?
261
315
  command.params['region'] = region unless region.nil?
262
- command.params['jobId'] = job_id unless job_id.nil?
263
- command.query['quotaUser'] = quota_user unless quota_user.nil?
316
+ command.params['clusterName'] = cluster_name unless cluster_name.nil?
264
317
  command.query['fields'] = fields unless fields.nil?
318
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
265
319
  execute_or_queue_command(command, &block)
266
320
  end
267
321
 
268
- # Updates a job in a project.
269
- # @param [String] project_id
270
- # Required The ID of the Google Cloud Platform project that the job belongs to.
271
- # @param [String] region
272
- # Required The Cloud Dataproc region in which to handle the request.
273
- # @param [String] job_id
274
- # Required The job ID.
275
- # @param [Google::Apis::DataprocV1::Job] job_object
276
- # @param [String] update_mask
277
- # Required Specifies the path, relative to <code>Job</code>, of the field to
278
- # update. For example, to update the labels of a Job the <code>update_mask</code>
279
- # parameter would be specified as <code>labels</code>, and the PATCH request
280
- # body would specify the new value. <strong>Note:</strong> Currently, <code>
281
- # labels</code> is the only field that can be updated.
322
+ # Starts asynchronous cancellation on a long-running operation. The server makes
323
+ # a best effort to cancel the operation, but success is not guaranteed. If the
324
+ # server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
325
+ # Clients can use Operations.GetOperation or other methods to check whether the
326
+ # cancellation succeeded or whether the operation completed despite cancellation.
327
+ # On successful cancellation, the operation is not deleted; instead, it becomes
328
+ # an operation with an Operation.error value with a google.rpc.Status.code of 1,
329
+ # corresponding to Code.CANCELLED.
330
+ # @param [String] name
331
+ # The name of the operation resource to be cancelled.
332
+ # @param [String] fields
333
+ # Selector specifying which fields to include in a partial response.
282
334
  # @param [String] quota_user
283
335
  # Available to use for quota purposes for server-side applications. Can be any
284
336
  # arbitrary string assigned to a user, but should not exceed 40 characters.
285
- # @param [String] fields
286
- # Selector specifying which fields to include in a partial response.
287
337
  # @param [Google::Apis::RequestOptions] options
288
338
  # Request-specific options
289
339
  #
290
340
  # @yield [result, err] Result & error if block supplied
291
- # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
341
+ # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
292
342
  # @yieldparam err [StandardError] error object if request failed
293
343
  #
294
- # @return [Google::Apis::DataprocV1::Job]
344
+ # @return [Google::Apis::DataprocV1::Empty]
295
345
  #
296
346
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
297
347
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
298
348
  # @raise [Google::Apis::AuthorizationError] Authorization is required
299
- def patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
300
- command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
301
- command.request_representation = Google::Apis::DataprocV1::Job::Representation
302
- command.request_object = job_object
303
- command.response_representation = Google::Apis::DataprocV1::Job::Representation
304
- command.response_class = Google::Apis::DataprocV1::Job
305
- command.params['projectId'] = project_id unless project_id.nil?
306
- command.params['region'] = region unless region.nil?
307
- command.params['jobId'] = job_id unless job_id.nil?
308
- command.query['updateMask'] = update_mask unless update_mask.nil?
309
- command.query['quotaUser'] = quota_user unless quota_user.nil?
349
+ def cancel_operation(name, fields: nil, quota_user: nil, options: nil, &block)
350
+ command = make_simple_command(:post, 'v1/{+name}:cancel', options)
351
+ command.response_representation = Google::Apis::DataprocV1::Empty::Representation
352
+ command.response_class = Google::Apis::DataprocV1::Empty
353
+ command.params['name'] = name unless name.nil?
310
354
  command.query['fields'] = fields unless fields.nil?
355
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
311
356
  execute_or_queue_command(command, &block)
312
357
  end
313
358
 
314
- # Submits a job to a cluster.
315
- # @param [String] project_id
316
- # Required The ID of the Google Cloud Platform project that the job belongs to.
317
- # @param [String] region
318
- # Required The Cloud Dataproc region in which to handle the request.
319
- # @param [Google::Apis::DataprocV1::SubmitJobRequest] submit_job_request_object
359
+ # Deletes a long-running operation. This method indicates that the client is no
360
+ # longer interested in the operation result. It does not cancel the operation.
361
+ # If the server doesn't support this method, it returns google.rpc.Code.
362
+ # UNIMPLEMENTED.
363
+ # @param [String] name
364
+ # The name of the operation resource to be deleted.
365
+ # @param [String] fields
366
+ # Selector specifying which fields to include in a partial response.
320
367
  # @param [String] quota_user
321
368
  # Available to use for quota purposes for server-side applications. Can be any
322
369
  # arbitrary string assigned to a user, but should not exceed 40 characters.
323
- # @param [String] fields
324
- # Selector specifying which fields to include in a partial response.
325
370
  # @param [Google::Apis::RequestOptions] options
326
371
  # Request-specific options
327
372
  #
328
373
  # @yield [result, err] Result & error if block supplied
329
- # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
374
+ # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
330
375
  # @yieldparam err [StandardError] error object if request failed
331
376
  #
332
- # @return [Google::Apis::DataprocV1::Job]
377
+ # @return [Google::Apis::DataprocV1::Empty]
333
378
  #
334
379
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
335
380
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
336
381
  # @raise [Google::Apis::AuthorizationError] Authorization is required
337
- def submit_job(project_id, region, submit_job_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
338
- command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', options)
339
- command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation
340
- command.request_object = submit_job_request_object
341
- command.response_representation = Google::Apis::DataprocV1::Job::Representation
342
- command.response_class = Google::Apis::DataprocV1::Job
343
- command.params['projectId'] = project_id unless project_id.nil?
344
- command.params['region'] = region unless region.nil?
345
- command.query['quotaUser'] = quota_user unless quota_user.nil?
382
+ def delete_operation(name, fields: nil, quota_user: nil, options: nil, &block)
383
+ command = make_simple_command(:delete, 'v1/{+name}', options)
384
+ command.response_representation = Google::Apis::DataprocV1::Empty::Representation
385
+ command.response_class = Google::Apis::DataprocV1::Empty
386
+ command.params['name'] = name unless name.nil?
346
387
  command.query['fields'] = fields unless fields.nil?
388
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
347
389
  execute_or_queue_command(command, &block)
348
390
  end
349
391
 
350
- # Deletes the job from the project. If the job is active, the delete fails, and
351
- # the response returns FAILED_PRECONDITION.
352
- # @param [String] project_id
353
- # Required The ID of the Google Cloud Platform project that the job belongs to.
354
- # @param [String] region
355
- # Required The Cloud Dataproc region in which to handle the request.
356
- # @param [String] job_id
357
- # Required The job ID.
392
+ # Lists operations that match the specified filter in the request. If the server
393
+ # doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding
394
+ # below allows API services to override the binding to use different resource
395
+ # name schemes, such as users/*/operations.
396
+ # @param [String] name
397
+ # The name of the operation collection.
398
+ # @param [String] page_token
399
+ # The standard list page token.
400
+ # @param [Fixnum] page_size
401
+ # The standard list page size.
402
+ # @param [String] filter
403
+ # The standard list filter.
404
+ # @param [String] fields
405
+ # Selector specifying which fields to include in a partial response.
358
406
  # @param [String] quota_user
359
407
  # Available to use for quota purposes for server-side applications. Can be any
360
408
  # arbitrary string assigned to a user, but should not exceed 40 characters.
361
- # @param [String] fields
362
- # Selector specifying which fields to include in a partial response.
363
409
  # @param [Google::Apis::RequestOptions] options
364
410
  # Request-specific options
365
411
  #
366
412
  # @yield [result, err] Result & error if block supplied
367
- # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
413
+ # @yieldparam result [Google::Apis::DataprocV1::ListOperationsResponse] parsed result object
368
414
  # @yieldparam err [StandardError] error object if request failed
369
415
  #
370
- # @return [Google::Apis::DataprocV1::Empty]
416
+ # @return [Google::Apis::DataprocV1::ListOperationsResponse]
371
417
  #
372
418
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
373
419
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
374
420
  # @raise [Google::Apis::AuthorizationError] Authorization is required
375
- def delete_job(project_id, region, job_id, quota_user: nil, fields: nil, options: nil, &block)
376
- command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
377
- command.response_representation = Google::Apis::DataprocV1::Empty::Representation
378
- command.response_class = Google::Apis::DataprocV1::Empty
379
- command.params['projectId'] = project_id unless project_id.nil?
380
- command.params['region'] = region unless region.nil?
381
- command.params['jobId'] = job_id unless job_id.nil?
382
- command.query['quotaUser'] = quota_user unless quota_user.nil?
421
+ def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
422
+ command = make_simple_command(:get, 'v1/{+name}', options)
423
+ command.response_representation = Google::Apis::DataprocV1::ListOperationsResponse::Representation
424
+ command.response_class = Google::Apis::DataprocV1::ListOperationsResponse
425
+ command.params['name'] = name unless name.nil?
426
+ command.query['pageToken'] = page_token unless page_token.nil?
427
+ command.query['pageSize'] = page_size unless page_size.nil?
428
+ command.query['filter'] = filter unless filter.nil?
383
429
  command.query['fields'] = fields unless fields.nil?
430
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
384
431
  execute_or_queue_command(command, &block)
385
432
  end
386
433
 
387
- # Lists regions/`region`/jobs in a project.
388
- # @param [String] project_id
389
- # Required The ID of the Google Cloud Platform project that the job belongs to.
390
- # @param [String] region
391
- # Required The Cloud Dataproc region in which to handle the request.
392
- # @param [String] filter
393
- # Optional A filter constraining the jobs to list. Filters are case-sensitive
394
- # and have the following syntax:field = value AND field = value ...where field
395
- # is status.state or labels.[KEY], and [KEY] is a label key. value can be * to
396
- # match all values. status.state can be either ACTIVE or INACTIVE. Only the
397
- # logical AND operator is supported; space-separated items are treated as having
398
- # an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env =
399
- # staging AND labels.starred = *
400
- # @param [String] job_state_matcher
401
- # Optional Specifies enumerated categories of jobs to list (default = match ALL
402
- # jobs).
403
- # @param [String] page_token
404
- # Optional The page token, returned by a previous call, to request the next page
405
- # of results.
406
- # @param [Fixnum] page_size
407
- # Optional The number of results to return in each response.
408
- # @param [String] cluster_name
409
- # Optional If set, the returned jobs list includes only jobs that were submitted
410
- # to the named cluster.
434
+ # Gets the latest state of a long-running operation. Clients can use this method
435
+ # to poll the operation result at intervals as recommended by the API service.
436
+ # @param [String] name
437
+ # The name of the operation resource.
438
+ # @param [String] fields
439
+ # Selector specifying which fields to include in a partial response.
411
440
  # @param [String] quota_user
412
441
  # Available to use for quota purposes for server-side applications. Can be any
413
442
  # arbitrary string assigned to a user, but should not exceed 40 characters.
414
- # @param [String] fields
415
- # Selector specifying which fields to include in a partial response.
416
443
  # @param [Google::Apis::RequestOptions] options
417
444
  # Request-specific options
418
445
  #
419
446
  # @yield [result, err] Result & error if block supplied
420
- # @yieldparam result [Google::Apis::DataprocV1::ListJobsResponse] parsed result object
447
+ # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
421
448
  # @yieldparam err [StandardError] error object if request failed
422
449
  #
423
- # @return [Google::Apis::DataprocV1::ListJobsResponse]
450
+ # @return [Google::Apis::DataprocV1::Operation]
424
451
  #
425
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
426
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
427
- # @raise [Google::Apis::AuthorizationError] Authorization is required
428
- def list_jobs(project_id, region, filter: nil, job_state_matcher: nil, page_token: nil, page_size: nil, cluster_name: nil, quota_user: nil, fields: nil, options: nil, &block)
429
- command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options)
430
- command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation
431
- command.response_class = Google::Apis::DataprocV1::ListJobsResponse
432
- command.params['projectId'] = project_id unless project_id.nil?
433
- command.params['region'] = region unless region.nil?
434
- command.query['filter'] = filter unless filter.nil?
435
- command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil?
436
- command.query['pageToken'] = page_token unless page_token.nil?
437
- command.query['pageSize'] = page_size unless page_size.nil?
438
- command.query['clusterName'] = cluster_name unless cluster_name.nil?
439
- command.query['quotaUser'] = quota_user unless quota_user.nil?
452
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
453
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
454
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
455
+ def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
456
+ command = make_simple_command(:get, 'v1/{+name}', options)
457
+ command.response_representation = Google::Apis::DataprocV1::Operation::Representation
458
+ command.response_class = Google::Apis::DataprocV1::Operation
459
+ command.params['name'] = name unless name.nil?
440
460
  command.query['fields'] = fields unless fields.nil?
461
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
441
462
  execute_or_queue_command(command, &block)
442
463
  end
443
464
 
444
- # Lists all regions/`region`/clusters in a project.
465
+ # Starts a job cancellation request. To access the job resource after
466
+ # cancellation, call regions/`region`/jobs.list or regions/`region`/jobs.get.
445
467
  # @param [String] project_id
446
- # Required The ID of the Google Cloud Platform project that the cluster belongs
447
- # to.
468
+ # Required The ID of the Google Cloud Platform project that the job belongs to.
448
469
  # @param [String] region
449
470
  # Required The Cloud Dataproc region in which to handle the request.
450
- # @param [String] filter
451
- # Optional A filter constraining the clusters to list. Filters are case-
452
- # sensitive and have the following syntax:field = value AND field = value ...
453
- # where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is
454
- # a label key. value can be * to match all values. status.state can be one of
455
- # the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or
456
- # UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE
457
- # contains the DELETING and ERROR states. clusterName is the name of the cluster
458
- # provided at creation time. Only the logical AND operator is supported; space-
459
- # separated items are treated as having an implicit AND operator.Example filter:
460
- # status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND
461
- # labels.starred = *
462
- # @param [String] page_token
463
- # Optional The standard List page token.
464
- # @param [Fixnum] page_size
465
- # Optional The standard List page size.
471
+ # @param [String] job_id
472
+ # Required The job ID.
473
+ # @param [Google::Apis::DataprocV1::CancelJobRequest] cancel_job_request_object
474
+ # @param [String] fields
475
+ # Selector specifying which fields to include in a partial response.
466
476
  # @param [String] quota_user
467
477
  # Available to use for quota purposes for server-side applications. Can be any
468
478
  # arbitrary string assigned to a user, but should not exceed 40 characters.
469
- # @param [String] fields
470
- # Selector specifying which fields to include in a partial response.
471
479
  # @param [Google::Apis::RequestOptions] options
472
480
  # Request-specific options
473
481
  #
474
482
  # @yield [result, err] Result & error if block supplied
475
- # @yieldparam result [Google::Apis::DataprocV1::ListClustersResponse] parsed result object
483
+ # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
476
484
  # @yieldparam err [StandardError] error object if request failed
477
485
  #
478
- # @return [Google::Apis::DataprocV1::ListClustersResponse]
486
+ # @return [Google::Apis::DataprocV1::Job]
479
487
  #
480
488
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
481
489
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
482
490
  # @raise [Google::Apis::AuthorizationError] Authorization is required
483
- def list_clusters(project_id, region, filter: nil, page_token: nil, page_size: nil, quota_user: nil, fields: nil, options: nil, &block)
484
- command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters', options)
485
- command.response_representation = Google::Apis::DataprocV1::ListClustersResponse::Representation
486
- command.response_class = Google::Apis::DataprocV1::ListClustersResponse
491
+ def cancel_job(project_id, region, job_id, cancel_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
492
+ command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel', options)
493
+ command.request_representation = Google::Apis::DataprocV1::CancelJobRequest::Representation
494
+ command.request_object = cancel_job_request_object
495
+ command.response_representation = Google::Apis::DataprocV1::Job::Representation
496
+ command.response_class = Google::Apis::DataprocV1::Job
487
497
  command.params['projectId'] = project_id unless project_id.nil?
488
498
  command.params['region'] = region unless region.nil?
489
- command.query['filter'] = filter unless filter.nil?
490
- command.query['pageToken'] = page_token unless page_token.nil?
491
- command.query['pageSize'] = page_size unless page_size.nil?
492
- command.query['quotaUser'] = quota_user unless quota_user.nil?
499
+ command.params['jobId'] = job_id unless job_id.nil?
493
500
  command.query['fields'] = fields unless fields.nil?
501
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
494
502
  execute_or_queue_command(command, &block)
495
503
  end
496
504
 
497
- # Creates a cluster in a project.
505
+ # Updates a job in a project.
498
506
  # @param [String] project_id
499
- # Required The ID of the Google Cloud Platform project that the cluster belongs
500
- # to.
507
+ # Required The ID of the Google Cloud Platform project that the job belongs to.
501
508
  # @param [String] region
502
509
  # Required The Cloud Dataproc region in which to handle the request.
503
- # @param [Google::Apis::DataprocV1::Cluster] cluster_object
510
+ # @param [String] job_id
511
+ # Required The job ID.
512
+ # @param [Google::Apis::DataprocV1::Job] job_object
513
+ # @param [String] update_mask
514
+ # Required Specifies the path, relative to <code>Job</code>, of the field to
515
+ # update. For example, to update the labels of a Job the <code>update_mask</code>
516
+ # parameter would be specified as <code>labels</code>, and the PATCH request
517
+ # body would specify the new value. <strong>Note:</strong> Currently, <code>
518
+ # labels</code> is the only field that can be updated.
519
+ # @param [String] fields
520
+ # Selector specifying which fields to include in a partial response.
504
521
  # @param [String] quota_user
505
522
  # Available to use for quota purposes for server-side applications. Can be any
506
523
  # arbitrary string assigned to a user, but should not exceed 40 characters.
507
- # @param [String] fields
508
- # Selector specifying which fields to include in a partial response.
509
524
  # @param [Google::Apis::RequestOptions] options
510
525
  # Request-specific options
511
526
  #
512
527
  # @yield [result, err] Result & error if block supplied
513
- # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
528
+ # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
514
529
  # @yieldparam err [StandardError] error object if request failed
515
530
  #
516
- # @return [Google::Apis::DataprocV1::Operation]
531
+ # @return [Google::Apis::DataprocV1::Job]
517
532
  #
518
533
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
519
534
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
520
535
  # @raise [Google::Apis::AuthorizationError] Authorization is required
521
- def create_cluster(project_id, region, cluster_object = nil, quota_user: nil, fields: nil, options: nil, &block)
522
- command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters', options)
523
- command.request_representation = Google::Apis::DataprocV1::Cluster::Representation
524
- command.request_object = cluster_object
525
- command.response_representation = Google::Apis::DataprocV1::Operation::Representation
526
- command.response_class = Google::Apis::DataprocV1::Operation
536
+ def patch_project_region_job(project_id, region, job_id, job_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
537
+ command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
538
+ command.request_representation = Google::Apis::DataprocV1::Job::Representation
539
+ command.request_object = job_object
540
+ command.response_representation = Google::Apis::DataprocV1::Job::Representation
541
+ command.response_class = Google::Apis::DataprocV1::Job
527
542
  command.params['projectId'] = project_id unless project_id.nil?
528
543
  command.params['region'] = region unless region.nil?
529
- command.query['quotaUser'] = quota_user unless quota_user.nil?
544
+ command.params['jobId'] = job_id unless job_id.nil?
545
+ command.query['updateMask'] = update_mask unless update_mask.nil?
530
546
  command.query['fields'] = fields unless fields.nil?
547
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
531
548
  execute_or_queue_command(command, &block)
532
549
  end
533
550
 
534
- # Gets the resource representation for a cluster in a project.
551
+ # Gets the resource representation for a job in a project.
535
552
  # @param [String] project_id
536
- # Required The ID of the Google Cloud Platform project that the cluster belongs
537
- # to.
553
+ # Required The ID of the Google Cloud Platform project that the job belongs to.
538
554
  # @param [String] region
539
555
  # Required The Cloud Dataproc region in which to handle the request.
540
- # @param [String] cluster_name
541
- # Required The cluster name.
556
+ # @param [String] job_id
557
+ # Required The job ID.
558
+ # @param [String] fields
559
+ # Selector specifying which fields to include in a partial response.
542
560
  # @param [String] quota_user
543
561
  # Available to use for quota purposes for server-side applications. Can be any
544
562
  # arbitrary string assigned to a user, but should not exceed 40 characters.
545
- # @param [String] fields
546
- # Selector specifying which fields to include in a partial response.
547
563
  # @param [Google::Apis::RequestOptions] options
548
564
  # Request-specific options
549
565
  #
550
566
  # @yield [result, err] Result & error if block supplied
551
- # @yieldparam result [Google::Apis::DataprocV1::Cluster] parsed result object
567
+ # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
552
568
  # @yieldparam err [StandardError] error object if request failed
553
569
  #
554
- # @return [Google::Apis::DataprocV1::Cluster]
570
+ # @return [Google::Apis::DataprocV1::Job]
555
571
  #
556
572
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
557
573
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
558
574
  # @raise [Google::Apis::AuthorizationError] Authorization is required
559
- def get_cluster(project_id, region, cluster_name, quota_user: nil, fields: nil, options: nil, &block)
560
- command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
561
- command.response_representation = Google::Apis::DataprocV1::Cluster::Representation
562
- command.response_class = Google::Apis::DataprocV1::Cluster
575
+ def get_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
576
+ command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
577
+ command.response_representation = Google::Apis::DataprocV1::Job::Representation
578
+ command.response_class = Google::Apis::DataprocV1::Job
563
579
  command.params['projectId'] = project_id unless project_id.nil?
564
580
  command.params['region'] = region unless region.nil?
565
- command.params['clusterName'] = cluster_name unless cluster_name.nil?
566
- command.query['quotaUser'] = quota_user unless quota_user.nil?
581
+ command.params['jobId'] = job_id unless job_id.nil?
567
582
  command.query['fields'] = fields unless fields.nil?
583
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
568
584
  execute_or_queue_command(command, &block)
569
585
  end
570
586
 
571
- # Updates a cluster in a project.
587
+ # Submits a job to a cluster.
572
588
  # @param [String] project_id
573
- # Required The ID of the Google Cloud Platform project the cluster belongs to.
589
+ # Required The ID of the Google Cloud Platform project that the job belongs to.
574
590
  # @param [String] region
575
591
  # Required The Cloud Dataproc region in which to handle the request.
576
- # @param [String] cluster_name
577
- # Required The cluster name.
578
- # @param [Google::Apis::DataprocV1::Cluster] cluster_object
579
- # @param [String] update_mask
580
- # Required Specifies the path, relative to <code>Cluster</code>, of the field to
581
- # update. For example, to change the number of workers in a cluster to 5, the <
582
- # code>update_mask</code> parameter would be specified as <code>config.
583
- # worker_config.num_instances</code>, and the PATCH request body would specify
584
- # the new value, as follows:
585
- # `
586
- # "config":`
587
- # "workerConfig":`
588
- # "numInstances":"5"
589
- # `
590
- # `
591
- # `
592
- # Similarly, to change the number of preemptible workers in a cluster to 5, the <
593
- # code>update_mask</code> parameter would be <code>config.
594
- # secondary_worker_config.num_instances</code>, and the PATCH request body would
595
- # be set as follows:
596
- # `
597
- # "config":`
598
- # "secondaryWorkerConfig":`
599
- # "numInstances":"5"
600
- # `
601
- # `
602
- # `
603
- # <strong>Note:</strong> Currently, <code>config.worker_config.num_instances</
604
- # code> and <code>config.secondary_worker_config.num_instances</code> are the
605
- # only fields that can be updated.
592
+ # @param [Google::Apis::DataprocV1::SubmitJobRequest] submit_job_request_object
593
+ # @param [String] fields
594
+ # Selector specifying which fields to include in a partial response.
606
595
  # @param [String] quota_user
607
596
  # Available to use for quota purposes for server-side applications. Can be any
608
597
  # arbitrary string assigned to a user, but should not exceed 40 characters.
609
- # @param [String] fields
610
- # Selector specifying which fields to include in a partial response.
611
598
  # @param [Google::Apis::RequestOptions] options
612
599
  # Request-specific options
613
600
  #
614
601
  # @yield [result, err] Result & error if block supplied
615
- # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
602
+ # @yieldparam result [Google::Apis::DataprocV1::Job] parsed result object
616
603
  # @yieldparam err [StandardError] error object if request failed
617
604
  #
618
- # @return [Google::Apis::DataprocV1::Operation]
605
+ # @return [Google::Apis::DataprocV1::Job]
619
606
  #
620
607
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
621
608
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
622
609
  # @raise [Google::Apis::AuthorizationError] Authorization is required
623
- def patch_cluster(project_id, region, cluster_name, cluster_object = nil, update_mask: nil, quota_user: nil, fields: nil, options: nil, &block)
624
- command = make_simple_command(:patch, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
625
- command.request_representation = Google::Apis::DataprocV1::Cluster::Representation
626
- command.request_object = cluster_object
627
- command.response_representation = Google::Apis::DataprocV1::Operation::Representation
628
- command.response_class = Google::Apis::DataprocV1::Operation
610
+ def submit_job(project_id, region, submit_job_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
611
+ command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/jobs:submit', options)
612
+ command.request_representation = Google::Apis::DataprocV1::SubmitJobRequest::Representation
613
+ command.request_object = submit_job_request_object
614
+ command.response_representation = Google::Apis::DataprocV1::Job::Representation
615
+ command.response_class = Google::Apis::DataprocV1::Job
629
616
  command.params['projectId'] = project_id unless project_id.nil?
630
617
  command.params['region'] = region unless region.nil?
631
- command.params['clusterName'] = cluster_name unless cluster_name.nil?
632
- command.query['updateMask'] = update_mask unless update_mask.nil?
633
- command.query['quotaUser'] = quota_user unless quota_user.nil?
634
618
  command.query['fields'] = fields unless fields.nil?
619
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
635
620
  execute_or_queue_command(command, &block)
636
621
  end
637
622
 
638
- # Deletes a cluster in a project.
623
+ # Deletes the job from the project. If the job is active, the delete fails, and
624
+ # the response returns FAILED_PRECONDITION.
639
625
  # @param [String] project_id
640
- # Required The ID of the Google Cloud Platform project that the cluster belongs
641
- # to.
626
+ # Required The ID of the Google Cloud Platform project that the job belongs to.
642
627
  # @param [String] region
643
628
  # Required The Cloud Dataproc region in which to handle the request.
644
- # @param [String] cluster_name
645
- # Required The cluster name.
629
+ # @param [String] job_id
630
+ # Required The job ID.
631
+ # @param [String] fields
632
+ # Selector specifying which fields to include in a partial response.
646
633
  # @param [String] quota_user
647
634
  # Available to use for quota purposes for server-side applications. Can be any
648
635
  # arbitrary string assigned to a user, but should not exceed 40 characters.
649
- # @param [String] fields
650
- # Selector specifying which fields to include in a partial response.
651
636
  # @param [Google::Apis::RequestOptions] options
652
637
  # Request-specific options
653
638
  #
654
639
  # @yield [result, err] Result & error if block supplied
655
- # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
640
+ # @yieldparam result [Google::Apis::DataprocV1::Empty] parsed result object
656
641
  # @yieldparam err [StandardError] error object if request failed
657
642
  #
658
- # @return [Google::Apis::DataprocV1::Operation]
643
+ # @return [Google::Apis::DataprocV1::Empty]
659
644
  #
660
645
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
661
646
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
662
647
  # @raise [Google::Apis::AuthorizationError] Authorization is required
663
- def delete_cluster(project_id, region, cluster_name, quota_user: nil, fields: nil, options: nil, &block)
664
- command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}', options)
665
- command.response_representation = Google::Apis::DataprocV1::Operation::Representation
666
- command.response_class = Google::Apis::DataprocV1::Operation
648
+ def delete_job(project_id, region, job_id, fields: nil, quota_user: nil, options: nil, &block)
649
+ command = make_simple_command(:delete, 'v1/projects/{projectId}/regions/{region}/jobs/{jobId}', options)
650
+ command.response_representation = Google::Apis::DataprocV1::Empty::Representation
651
+ command.response_class = Google::Apis::DataprocV1::Empty
667
652
  command.params['projectId'] = project_id unless project_id.nil?
668
653
  command.params['region'] = region unless region.nil?
669
- command.params['clusterName'] = cluster_name unless cluster_name.nil?
670
- command.query['quotaUser'] = quota_user unless quota_user.nil?
654
+ command.params['jobId'] = job_id unless job_id.nil?
671
655
  command.query['fields'] = fields unless fields.nil?
656
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
672
657
  execute_or_queue_command(command, &block)
673
658
  end
674
659
 
675
- # Gets cluster diagnostic information. After the operation completes, the
676
- # Operation.response field contains DiagnoseClusterOutputLocation.
660
+ # Lists regions/`region`/jobs in a project.
677
661
  # @param [String] project_id
678
- # Required The ID of the Google Cloud Platform project that the cluster belongs
679
- # to.
662
+ # Required The ID of the Google Cloud Platform project that the job belongs to.
680
663
  # @param [String] region
681
664
  # Required The Cloud Dataproc region in which to handle the request.
665
+ # @param [String] page_token
666
+ # Optional The page token, returned by a previous call, to request the next page
667
+ # of results.
668
+ # @param [Fixnum] page_size
669
+ # Optional The number of results to return in each response.
682
670
  # @param [String] cluster_name
683
- # Required The cluster name.
684
- # @param [Google::Apis::DataprocV1::DiagnoseClusterRequest] diagnose_cluster_request_object
671
+ # Optional If set, the returned jobs list includes only jobs that were submitted
672
+ # to the named cluster.
673
+ # @param [String] filter
674
+ # Optional A filter constraining the jobs to list. Filters are case-sensitive
675
+ # and have the following syntax:field = value AND field = value ...where field
676
+ # is status.state or labels.[KEY], and [KEY] is a label key. value can be * to
677
+ # match all values. status.state can be either ACTIVE or INACTIVE. Only the
678
+ # logical AND operator is supported; space-separated items are treated as having
679
+ # an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env =
680
+ # staging AND labels.starred = *
681
+ # @param [String] job_state_matcher
682
+ # Optional Specifies enumerated categories of jobs to list (default = match ALL
683
+ # jobs).
684
+ # @param [String] fields
685
+ # Selector specifying which fields to include in a partial response.
685
686
  # @param [String] quota_user
686
687
  # Available to use for quota purposes for server-side applications. Can be any
687
688
  # arbitrary string assigned to a user, but should not exceed 40 characters.
688
- # @param [String] fields
689
- # Selector specifying which fields to include in a partial response.
690
689
  # @param [Google::Apis::RequestOptions] options
691
690
  # Request-specific options
692
691
  #
693
692
  # @yield [result, err] Result & error if block supplied
694
- # @yieldparam result [Google::Apis::DataprocV1::Operation] parsed result object
693
+ # @yieldparam result [Google::Apis::DataprocV1::ListJobsResponse] parsed result object
695
694
  # @yieldparam err [StandardError] error object if request failed
696
695
  #
697
- # @return [Google::Apis::DataprocV1::Operation]
696
+ # @return [Google::Apis::DataprocV1::ListJobsResponse]
698
697
  #
699
698
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
700
699
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
701
700
  # @raise [Google::Apis::AuthorizationError] Authorization is required
702
- def diagnose_cluster(project_id, region, cluster_name, diagnose_cluster_request_object = nil, quota_user: nil, fields: nil, options: nil, &block)
703
- command = make_simple_command(:post, 'v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose', options)
704
- command.request_representation = Google::Apis::DataprocV1::DiagnoseClusterRequest::Representation
705
- command.request_object = diagnose_cluster_request_object
706
- command.response_representation = Google::Apis::DataprocV1::Operation::Representation
707
- command.response_class = Google::Apis::DataprocV1::Operation
701
+ def list_jobs(project_id, region, page_token: nil, page_size: nil, cluster_name: nil, filter: nil, job_state_matcher: nil, fields: nil, quota_user: nil, options: nil, &block)
702
+ command = make_simple_command(:get, 'v1/projects/{projectId}/regions/{region}/jobs', options)
703
+ command.response_representation = Google::Apis::DataprocV1::ListJobsResponse::Representation
704
+ command.response_class = Google::Apis::DataprocV1::ListJobsResponse
708
705
  command.params['projectId'] = project_id unless project_id.nil?
709
706
  command.params['region'] = region unless region.nil?
710
- command.params['clusterName'] = cluster_name unless cluster_name.nil?
711
- command.query['quotaUser'] = quota_user unless quota_user.nil?
707
+ command.query['pageToken'] = page_token unless page_token.nil?
708
+ command.query['pageSize'] = page_size unless page_size.nil?
709
+ command.query['clusterName'] = cluster_name unless cluster_name.nil?
710
+ command.query['filter'] = filter unless filter.nil?
711
+ command.query['jobStateMatcher'] = job_state_matcher unless job_state_matcher.nil?
712
712
  command.query['fields'] = fields unless fields.nil?
713
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
713
714
  execute_or_queue_command(command, &block)
714
715
  end
715
716
 
716
717
  protected
717
718
 
718
719
  def apply_command_defaults(command)
719
- command.query['quotaUser'] = quota_user unless quota_user.nil?
720
720
  command.query['key'] = key unless key.nil?
721
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
721
722
  end
722
723
  end
723
724
  end