google-api-client 0.10.2 → 0.10.3

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