google-api-client 0.10.0 → 0.10.1

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