google-api-client 0.9.28 → 0.10.0

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