google-apis-remotebuildexecution_v1alpha 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,462 @@
1
+ # Copyright 2020 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module RemotebuildexecutionV1alpha
23
+ # Remote Build Execution API
24
+ #
25
+ # Supplies a Remote Execution API service for tools such as bazel.
26
+ #
27
+ # @example
28
+ # require 'google/apis/remotebuildexecution_v1alpha'
29
+ #
30
+ # Remotebuildexecution = Google::Apis::RemotebuildexecutionV1alpha # Alias the module
31
+ # service = Remotebuildexecution::RemoteBuildExecutionService.new
32
+ #
33
+ # @see https://cloud.google.com/remote-build-execution/docs/
34
+ class RemoteBuildExecutionService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ attr_accessor :quota_user
44
+
45
+ def initialize
46
+ super('https://admin-remotebuildexecution.googleapis.com/', '',
47
+ client_name: 'google-apis-remotebuildexecution_v1alpha',
48
+ client_version: Google::Apis::RemotebuildexecutionV1alpha::GEM_VERSION)
49
+ @batch_path = 'batch'
50
+ end
51
+
52
+ # Creates a new instance in the specified region. Returns a long running
53
+ # operation which contains an instance on completion. While the long running
54
+ # operation is in progress, any call to `GetInstance` returns an instance in
55
+ # state `CREATING`.
56
+ # @param [String] parent
57
+ # Resource name of the project containing the instance. Format: `projects/[
58
+ # PROJECT_ID]`.
59
+ # @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest] google_devtools_remotebuildexecution_admin_v1alpha_create_instance_request_object
60
+ # @param [String] fields
61
+ # Selector specifying which fields to include in a partial response.
62
+ # @param [String] quota_user
63
+ # Available to use for quota purposes for server-side applications. Can be any
64
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
65
+ # @param [Google::Apis::RequestOptions] options
66
+ # Request-specific options
67
+ #
68
+ # @yield [result, err] Result & error if block supplied
69
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
70
+ # @yieldparam err [StandardError] error object if request failed
71
+ #
72
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
73
+ #
74
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
75
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
76
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
77
+ def create_project_instance(parent, google_devtools_remotebuildexecution_admin_v1alpha_create_instance_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
78
+ command = make_simple_command(:post, 'v1alpha/{+parent}/instances', options)
79
+ command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest::Representation
80
+ command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_create_instance_request_object
81
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
82
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
83
+ command.params['parent'] = parent unless parent.nil?
84
+ command.query['fields'] = fields unless fields.nil?
85
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
86
+ execute_or_queue_command(command, &block)
87
+ end
88
+
89
+ # Deletes the specified instance. Returns a long running operation which
90
+ # contains a `google.protobuf.Empty` response on completion. Deleting an
91
+ # instance with worker pools in it will delete these worker pools.
92
+ # @param [String] name
93
+ # Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[
94
+ # INSTANCE_ID]`.
95
+ # @param [String] fields
96
+ # Selector specifying which fields to include in a partial response.
97
+ # @param [String] quota_user
98
+ # Available to use for quota purposes for server-side applications. Can be any
99
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
100
+ # @param [Google::Apis::RequestOptions] options
101
+ # Request-specific options
102
+ #
103
+ # @yield [result, err] Result & error if block supplied
104
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
105
+ # @yieldparam err [StandardError] error object if request failed
106
+ #
107
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
108
+ #
109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
112
+ def delete_project_instance(name, fields: nil, quota_user: nil, options: nil, &block)
113
+ command = make_simple_command(:delete, 'v1alpha/{+name}', options)
114
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
115
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
116
+ command.params['name'] = name unless name.nil?
117
+ command.query['fields'] = fields unless fields.nil?
118
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
119
+ execute_or_queue_command(command, &block)
120
+ end
121
+
122
+ # Returns the specified instance.
123
+ # @param [String] name
124
+ # Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[
125
+ # INSTANCE_ID]`.
126
+ # @param [String] fields
127
+ # Selector specifying which fields to include in a partial response.
128
+ # @param [String] quota_user
129
+ # Available to use for quota purposes for server-side applications. Can be any
130
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
131
+ # @param [Google::Apis::RequestOptions] options
132
+ # Request-specific options
133
+ #
134
+ # @yield [result, err] Result & error if block supplied
135
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance] parsed result object
136
+ # @yieldparam err [StandardError] error object if request failed
137
+ #
138
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance]
139
+ #
140
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
141
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
142
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
143
+ def get_project_instance(name, fields: nil, quota_user: nil, options: nil, &block)
144
+ command = make_simple_command(:get, 'v1alpha/{+name}', options)
145
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance::Representation
146
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance
147
+ command.params['name'] = name unless name.nil?
148
+ command.query['fields'] = fields unless fields.nil?
149
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
150
+ execute_or_queue_command(command, &block)
151
+ end
152
+
153
+ # Lists instances in a project.
154
+ # @param [String] parent
155
+ # Resource name of the project. Format: `projects/[PROJECT_ID]`.
156
+ # @param [String] fields
157
+ # Selector specifying which fields to include in a partial response.
158
+ # @param [String] quota_user
159
+ # Available to use for quota purposes for server-side applications. Can be any
160
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
161
+ # @param [Google::Apis::RequestOptions] options
162
+ # Request-specific options
163
+ #
164
+ # @yield [result, err] Result & error if block supplied
165
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse] parsed result object
166
+ # @yieldparam err [StandardError] error object if request failed
167
+ #
168
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse]
169
+ #
170
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
171
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
172
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
173
+ def list_project_instances(parent, fields: nil, quota_user: nil, options: nil, &block)
174
+ command = make_simple_command(:get, 'v1alpha/{+parent}/instances', options)
175
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse::Representation
176
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse
177
+ command.params['parent'] = parent unless parent.nil?
178
+ command.query['fields'] = fields unless fields.nil?
179
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
180
+ execute_or_queue_command(command, &block)
181
+ end
182
+
183
+ # Updates the specified instance. Returns a long running operation which
184
+ # contains the updated instance in the response on completion.
185
+ # @param [String] name
186
+ # Output only. Instance resource name formatted as: `projects/[PROJECT_ID]/
187
+ # instances/[INSTANCE_ID]`. Name should not be populated when creating an
188
+ # instance since it is provided in the `instance_id` field.
189
+ # @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance] google_devtools_remotebuildexecution_admin_v1alpha_instance_object
190
+ # @param [Boolean] logging_enabled
191
+ # Deprecated, use instance.logging_enabled instead. Whether to enable
192
+ # Stackdriver logging for this instance.
193
+ # @param [String] name1
194
+ # Deprecated, use instance.Name instead. Name of the instance to update. Format:
195
+ # `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.
196
+ # @param [String] update_mask
197
+ # The update mask applies to instance. For the `FieldMask` definition, see https:
198
+ # //developers.google.com/protocol-buffers/docs/reference/google.protobuf#
199
+ # fieldmask If an empty update_mask is provided, only the non-default valued
200
+ # field in the worker pool field will be updated. Note that in order to update a
201
+ # field to the default value (zero, false, empty string) an explicit update_mask
202
+ # must be provided.
203
+ # @param [String] fields
204
+ # Selector specifying which fields to include in a partial response.
205
+ # @param [String] quota_user
206
+ # Available to use for quota purposes for server-side applications. Can be any
207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
208
+ # @param [Google::Apis::RequestOptions] options
209
+ # Request-specific options
210
+ #
211
+ # @yield [result, err] Result & error if block supplied
212
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
213
+ # @yieldparam err [StandardError] error object if request failed
214
+ #
215
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
216
+ #
217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
220
+ def patch_project_instance(name, google_devtools_remotebuildexecution_admin_v1alpha_instance_object = nil, logging_enabled: nil, name1: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
221
+ command = make_simple_command(:patch, 'v1alpha/{+name}', options)
222
+ command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance::Representation
223
+ command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_instance_object
224
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
225
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
226
+ command.params['name'] = name unless name.nil?
227
+ command.query['loggingEnabled'] = logging_enabled unless logging_enabled.nil?
228
+ command.query['name1'] = name1 unless name1.nil?
229
+ command.query['updateMask'] = update_mask unless update_mask.nil?
230
+ command.query['fields'] = fields unless fields.nil?
231
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
232
+ execute_or_queue_command(command, &block)
233
+ end
234
+
235
+ # Creates a new worker pool with a specified size and configuration. Returns a
236
+ # long running operation which contains a worker pool on completion. While the
237
+ # long running operation is in progress, any call to `GetWorkerPool` returns a
238
+ # worker pool in state `CREATING`.
239
+ # @param [String] parent
240
+ # Resource name of the instance in which to create the new worker pool. Format: `
241
+ # projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.
242
+ # @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest] google_devtools_remotebuildexecution_admin_v1alpha_create_worker_pool_request_object
243
+ # @param [String] fields
244
+ # Selector specifying which fields to include in a partial response.
245
+ # @param [String] quota_user
246
+ # Available to use for quota purposes for server-side applications. Can be any
247
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
248
+ # @param [Google::Apis::RequestOptions] options
249
+ # Request-specific options
250
+ #
251
+ # @yield [result, err] Result & error if block supplied
252
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
253
+ # @yieldparam err [StandardError] error object if request failed
254
+ #
255
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
256
+ #
257
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
258
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
259
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
260
+ def create_project_instance_workerpool(parent, google_devtools_remotebuildexecution_admin_v1alpha_create_worker_pool_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
261
+ command = make_simple_command(:post, 'v1alpha/{+parent}/workerpools', options)
262
+ command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest::Representation
263
+ command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_create_worker_pool_request_object
264
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
265
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
266
+ command.params['parent'] = parent unless parent.nil?
267
+ command.query['fields'] = fields unless fields.nil?
268
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
269
+ execute_or_queue_command(command, &block)
270
+ end
271
+
272
+ # Deletes the specified worker pool. Returns a long running operation, which
273
+ # contains a `google.protobuf.Empty` response on completion. While the long
274
+ # running operation is in progress, any call to `GetWorkerPool` returns a worker
275
+ # pool in state `DELETING`.
276
+ # @param [String] name
277
+ # Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[
278
+ # INSTANCE_ID]/workerpools/[POOL_ID]`.
279
+ # @param [String] fields
280
+ # Selector specifying which fields to include in a partial response.
281
+ # @param [String] quota_user
282
+ # Available to use for quota purposes for server-side applications. Can be any
283
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
284
+ # @param [Google::Apis::RequestOptions] options
285
+ # Request-specific options
286
+ #
287
+ # @yield [result, err] Result & error if block supplied
288
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
289
+ # @yieldparam err [StandardError] error object if request failed
290
+ #
291
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
292
+ #
293
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
294
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
295
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
296
+ def delete_project_instance_workerpool(name, fields: nil, quota_user: nil, options: nil, &block)
297
+ command = make_simple_command(:delete, 'v1alpha/{+name}', options)
298
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
299
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
300
+ command.params['name'] = name unless name.nil?
301
+ command.query['fields'] = fields unless fields.nil?
302
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
303
+ execute_or_queue_command(command, &block)
304
+ end
305
+
306
+ # Returns the specified worker pool.
307
+ # @param [String] name
308
+ # Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[
309
+ # INSTANCE_ID]/workerpools/[POOL_ID]`.
310
+ # @param [String] fields
311
+ # Selector specifying which fields to include in a partial response.
312
+ # @param [String] quota_user
313
+ # Available to use for quota purposes for server-side applications. Can be any
314
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
315
+ # @param [Google::Apis::RequestOptions] options
316
+ # Request-specific options
317
+ #
318
+ # @yield [result, err] Result & error if block supplied
319
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool] parsed result object
320
+ # @yieldparam err [StandardError] error object if request failed
321
+ #
322
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool]
323
+ #
324
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
325
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
326
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
327
+ def get_project_instance_workerpool(name, fields: nil, quota_user: nil, options: nil, &block)
328
+ command = make_simple_command(:get, 'v1alpha/{+name}', options)
329
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool::Representation
330
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool
331
+ command.params['name'] = name unless name.nil?
332
+ command.query['fields'] = fields unless fields.nil?
333
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
334
+ execute_or_queue_command(command, &block)
335
+ end
336
+
337
+ # Lists worker pools in an instance.
338
+ # @param [String] parent
339
+ # Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[
340
+ # INSTANCE_ID]`.
341
+ # @param [String] filter
342
+ # Optional. A filter expression that filters resources listed in the response.
343
+ # The expression must specify the field name, a comparison operator, and the
344
+ # value that you want to use for filtering. The value must be a string, a number,
345
+ # or a boolean. String values are case-insensitive. The comparison operator
346
+ # must be either `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` operator can be
347
+ # used with string fields to match substrings. For non-string fields it is
348
+ # equivalent to the `=` operator. The `:*` comparison can be used to test
349
+ # whether a key has been defined. You can also filter on nested fields. To
350
+ # filter on multiple expressions, you can separate expression using `AND` and `
351
+ # OR` operators, using parentheses to specify precedence. If neither operator is
352
+ # specified, `AND` is assumed. Examples: Include only pools with more than 100
353
+ # reserved workers: `(worker_count > 100) (worker_config.reserved = true)`
354
+ # Include only pools with a certain label or machines of the n1-standard family:
355
+ # `worker_config.labels.key1 : * OR worker_config.machine_type: n1-standard`
356
+ # @param [String] fields
357
+ # Selector specifying which fields to include in a partial response.
358
+ # @param [String] quota_user
359
+ # Available to use for quota purposes for server-side applications. Can be any
360
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
361
+ # @param [Google::Apis::RequestOptions] options
362
+ # Request-specific options
363
+ #
364
+ # @yield [result, err] Result & error if block supplied
365
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse] parsed result object
366
+ # @yieldparam err [StandardError] error object if request failed
367
+ #
368
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse]
369
+ #
370
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
371
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
372
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
373
+ def list_project_instance_workerpools(parent, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
374
+ command = make_simple_command(:get, 'v1alpha/{+parent}/workerpools', options)
375
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse::Representation
376
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse
377
+ command.params['parent'] = parent unless parent.nil?
378
+ command.query['filter'] = filter unless filter.nil?
379
+ command.query['fields'] = fields unless fields.nil?
380
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
381
+ execute_or_queue_command(command, &block)
382
+ end
383
+
384
+ # Updates an existing worker pool with a specified size and/or configuration.
385
+ # Returns a long running operation, which contains a worker pool on completion.
386
+ # While the long running operation is in progress, any call to `GetWorkerPool`
387
+ # returns a worker pool in state `UPDATING`.
388
+ # @param [String] name
389
+ # WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[
390
+ # INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when
391
+ # creating a worker pool since it is provided in the `poolId` field.
392
+ # @param [Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest] google_devtools_remotebuildexecution_admin_v1alpha_update_worker_pool_request_object
393
+ # @param [String] fields
394
+ # Selector specifying which fields to include in a partial response.
395
+ # @param [String] quota_user
396
+ # Available to use for quota purposes for server-side applications. Can be any
397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
398
+ # @param [Google::Apis::RequestOptions] options
399
+ # Request-specific options
400
+ #
401
+ # @yield [result, err] Result & error if block supplied
402
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
403
+ # @yieldparam err [StandardError] error object if request failed
404
+ #
405
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
406
+ #
407
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
408
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
409
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
410
+ def patch_project_instance_workerpool(name, google_devtools_remotebuildexecution_admin_v1alpha_update_worker_pool_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
411
+ command = make_simple_command(:patch, 'v1alpha/{+name}', options)
412
+ command.request_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest::Representation
413
+ command.request_object = google_devtools_remotebuildexecution_admin_v1alpha_update_worker_pool_request_object
414
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
415
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
416
+ command.params['name'] = name unless name.nil?
417
+ command.query['fields'] = fields unless fields.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ execute_or_queue_command(command, &block)
420
+ end
421
+
422
+ # Gets the latest state of a long-running operation. Clients can use this method
423
+ # to poll the operation result at intervals as recommended by the API service.
424
+ # @param [String] name
425
+ # The name of the operation resource.
426
+ # @param [String] fields
427
+ # Selector specifying which fields to include in a partial response.
428
+ # @param [String] quota_user
429
+ # Available to use for quota purposes for server-side applications. Can be any
430
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
431
+ # @param [Google::Apis::RequestOptions] options
432
+ # Request-specific options
433
+ #
434
+ # @yield [result, err] Result & error if block supplied
435
+ # @yieldparam result [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation] parsed result object
436
+ # @yieldparam err [StandardError] error object if request failed
437
+ #
438
+ # @return [Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation]
439
+ #
440
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
441
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
442
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
443
+ def get_project_operation(name, fields: nil, quota_user: nil, options: nil, &block)
444
+ command = make_simple_command(:get, 'v1alpha/{+name}', options)
445
+ command.response_representation = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation::Representation
446
+ command.response_class = Google::Apis::RemotebuildexecutionV1alpha::GoogleLongrunningOperation
447
+ command.params['name'] = name unless name.nil?
448
+ command.query['fields'] = fields unless fields.nil?
449
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
450
+ execute_or_queue_command(command, &block)
451
+ end
452
+
453
+ protected
454
+
455
+ def apply_command_defaults(command)
456
+ command.query['key'] = key unless key.nil?
457
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
458
+ end
459
+ end
460
+ end
461
+ end
462
+ end