google-api-client 0.11.2 → 0.11.3

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