google-cloud-build-v1 0.8.0 → 0.9.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9fd56485a3fdc9f9215f05e1d3635fb10f2ad27f8899f35170daeb98d0f26fae
4
- data.tar.gz: f8b547de79d4f2a7a7ef0d8d8af57623e32b434c8d225dc4c8d2bf9e838e8943
3
+ metadata.gz: 06cef793a91b08695313564873d2b96737d6c44c228c8cb03496c07d113f2cf9
4
+ data.tar.gz: f62d695108da2e93927c59dbde99567e62f1fb1d0f6a83121f8f28315c16cba2
5
5
  SHA512:
6
- metadata.gz: e3173ebb82d6622a541e3bed982214c872637505a368b38928cc791d90eb6f6faedd8f936c26a0864ad0dc116408e857f82d5a347af505b1bd7bb072ed67bc4a
7
- data.tar.gz: ffe588eee00a5e7e65b4743da9afa681c40f09a68230694441834a9a45febfedc25c31d3ee28f6d078de4dd45430f7733ccb34bb63edc90ccaef45c76f7b1e7d
6
+ metadata.gz: 1ff3f0ee25fc69dad4e875f1f882df357b2e7c9d447375d761a3deb8a4042a1095d416ff467c0f53a76ab72c13a251db803d027a2199dbaaa70f1f0497b7c011
7
+ data.tar.gz: b564660edcef7252f2faedfcbc34c099168097b08b0924275b7774967d4edaf21d35c685f14bb0f1c9a55c4218e8f5ca381694666cc1c7b8f9cd48af1bf79f40
data/AUTHENTICATION.md CHANGED
@@ -82,8 +82,8 @@ client = ::Google::Cloud::Build::V1::CloudBuild::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/cloud/build/v1"
@@ -93,7 +93,7 @@ client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/cloud/build/v1"
@@ -48,13 +48,12 @@ module Google
48
48
  # See {::Google::Cloud::Build::V1::CloudBuild::Client::Configuration}
49
49
  # for a description of the configuration fields.
50
50
  #
51
- # ## Example
51
+ # @example
52
52
  #
53
- # To modify the configuration for all CloudBuild clients:
54
- #
55
- # ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config|
56
- # config.timeout = 10.0
57
- # end
53
+ # # Modify the configuration for all CloudBuild clients
54
+ # ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config|
55
+ # config.timeout = 10.0
56
+ # end
58
57
  #
59
58
  # @yield [config] Configure the Client client.
60
59
  # @yieldparam config [Client::Configuration]
@@ -154,19 +153,15 @@ module Google
154
153
  ##
155
154
  # Create a new CloudBuild client object.
156
155
  #
157
- # ## Examples
158
- #
159
- # To create a new CloudBuild client with the default
160
- # configuration:
161
- #
162
- # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new
156
+ # @example
163
157
  #
164
- # To create a new CloudBuild client with a custom
165
- # configuration:
158
+ # # Create a client using the default configuration
159
+ # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new
166
160
  #
167
- # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config|
168
- # config.timeout = 10.0
169
- # end
161
+ # # Create a client using a custom configuration
162
+ # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config|
163
+ # config.timeout = 10.0
164
+ # end
170
165
  #
171
166
  # @yield [config] Configure the CloudBuild client.
172
167
  # @yieldparam config [Client::Configuration]
@@ -186,10 +181,9 @@ module Google
186
181
 
187
182
  # Create credentials
188
183
  credentials = @config.credentials
189
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
184
+ # Use self-signed JWT if the endpoint is unchanged from default,
190
185
  # but only if the default endpoint does not have a region prefix.
191
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
192
- @config.endpoint == Client.configure.endpoint &&
186
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
193
187
  !@config.endpoint.split(".").first.include?("-")
194
188
  credentials ||= Credentials.default scope: @config.scope,
195
189
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -286,7 +280,9 @@ module Google
286
280
  options.apply_defaults timeout: @config.rpcs.create_build.timeout,
287
281
  metadata: metadata,
288
282
  retry_policy: @config.rpcs.create_build.retry_policy
289
- options.apply_defaults metadata: @config.metadata,
283
+
284
+ options.apply_defaults timeout: @config.timeout,
285
+ metadata: @config.metadata,
290
286
  retry_policy: @config.retry_policy
291
287
 
292
288
  @cloud_build_stub.call_rpc :create_build, request, options: options do |response, operation|
@@ -362,7 +358,9 @@ module Google
362
358
  options.apply_defaults timeout: @config.rpcs.get_build.timeout,
363
359
  metadata: metadata,
364
360
  retry_policy: @config.rpcs.get_build.retry_policy
365
- options.apply_defaults metadata: @config.metadata,
361
+
362
+ options.apply_defaults timeout: @config.timeout,
363
+ metadata: @config.metadata,
366
364
  retry_policy: @config.retry_policy
367
365
 
368
366
  @cloud_build_stub.call_rpc :get_build, request, options: options do |response, operation|
@@ -448,7 +446,9 @@ module Google
448
446
  options.apply_defaults timeout: @config.rpcs.list_builds.timeout,
449
447
  metadata: metadata,
450
448
  retry_policy: @config.rpcs.list_builds.retry_policy
451
- options.apply_defaults metadata: @config.metadata,
449
+
450
+ options.apply_defaults timeout: @config.timeout,
451
+ metadata: @config.metadata,
452
452
  retry_policy: @config.retry_policy
453
453
 
454
454
  @cloud_build_stub.call_rpc :list_builds, request, options: options do |response, operation|
@@ -521,7 +521,9 @@ module Google
521
521
  options.apply_defaults timeout: @config.rpcs.cancel_build.timeout,
522
522
  metadata: metadata,
523
523
  retry_policy: @config.rpcs.cancel_build.retry_policy
524
- options.apply_defaults metadata: @config.metadata,
524
+
525
+ options.apply_defaults timeout: @config.timeout,
526
+ metadata: @config.metadata,
525
527
  retry_policy: @config.retry_policy
526
528
 
527
529
  @cloud_build_stub.call_rpc :cancel_build, request, options: options do |response, operation|
@@ -619,7 +621,9 @@ module Google
619
621
  options.apply_defaults timeout: @config.rpcs.retry_build.timeout,
620
622
  metadata: metadata,
621
623
  retry_policy: @config.rpcs.retry_build.retry_policy
622
- options.apply_defaults metadata: @config.metadata,
624
+
625
+ options.apply_defaults timeout: @config.timeout,
626
+ metadata: @config.metadata,
623
627
  retry_policy: @config.retry_policy
624
628
 
625
629
  @cloud_build_stub.call_rpc :retry_build, request, options: options do |response, operation|
@@ -693,7 +697,9 @@ module Google
693
697
  options.apply_defaults timeout: @config.rpcs.create_build_trigger.timeout,
694
698
  metadata: metadata,
695
699
  retry_policy: @config.rpcs.create_build_trigger.retry_policy
696
- options.apply_defaults metadata: @config.metadata,
700
+
701
+ options.apply_defaults timeout: @config.timeout,
702
+ metadata: @config.metadata,
697
703
  retry_policy: @config.retry_policy
698
704
 
699
705
  @cloud_build_stub.call_rpc :create_build_trigger, request, options: options do |response, operation|
@@ -767,7 +773,9 @@ module Google
767
773
  options.apply_defaults timeout: @config.rpcs.get_build_trigger.timeout,
768
774
  metadata: metadata,
769
775
  retry_policy: @config.rpcs.get_build_trigger.retry_policy
770
- options.apply_defaults metadata: @config.metadata,
776
+
777
+ options.apply_defaults timeout: @config.timeout,
778
+ metadata: @config.metadata,
771
779
  retry_policy: @config.retry_policy
772
780
 
773
781
  @cloud_build_stub.call_rpc :get_build_trigger, request, options: options do |response, operation|
@@ -842,7 +850,9 @@ module Google
842
850
  options.apply_defaults timeout: @config.rpcs.list_build_triggers.timeout,
843
851
  metadata: metadata,
844
852
  retry_policy: @config.rpcs.list_build_triggers.retry_policy
845
- options.apply_defaults metadata: @config.metadata,
853
+
854
+ options.apply_defaults timeout: @config.timeout,
855
+ metadata: @config.metadata,
846
856
  retry_policy: @config.retry_policy
847
857
 
848
858
  @cloud_build_stub.call_rpc :list_build_triggers, request, options: options do |response, operation|
@@ -917,7 +927,9 @@ module Google
917
927
  options.apply_defaults timeout: @config.rpcs.delete_build_trigger.timeout,
918
928
  metadata: metadata,
919
929
  retry_policy: @config.rpcs.delete_build_trigger.retry_policy
920
- options.apply_defaults metadata: @config.metadata,
930
+
931
+ options.apply_defaults timeout: @config.timeout,
932
+ metadata: @config.metadata,
921
933
  retry_policy: @config.retry_policy
922
934
 
923
935
  @cloud_build_stub.call_rpc :delete_build_trigger, request, options: options do |response, operation|
@@ -990,7 +1002,9 @@ module Google
990
1002
  options.apply_defaults timeout: @config.rpcs.update_build_trigger.timeout,
991
1003
  metadata: metadata,
992
1004
  retry_policy: @config.rpcs.update_build_trigger.retry_policy
993
- options.apply_defaults metadata: @config.metadata,
1005
+
1006
+ options.apply_defaults timeout: @config.timeout,
1007
+ metadata: @config.metadata,
994
1008
  retry_policy: @config.retry_policy
995
1009
 
996
1010
  @cloud_build_stub.call_rpc :update_build_trigger, request, options: options do |response, operation|
@@ -1064,7 +1078,9 @@ module Google
1064
1078
  options.apply_defaults timeout: @config.rpcs.run_build_trigger.timeout,
1065
1079
  metadata: metadata,
1066
1080
  retry_policy: @config.rpcs.run_build_trigger.retry_policy
1067
- options.apply_defaults metadata: @config.metadata,
1081
+
1082
+ options.apply_defaults timeout: @config.timeout,
1083
+ metadata: @config.metadata,
1068
1084
  retry_policy: @config.retry_policy
1069
1085
 
1070
1086
  @cloud_build_stub.call_rpc :run_build_trigger, request, options: options do |response, operation|
@@ -1142,7 +1158,9 @@ module Google
1142
1158
  options.apply_defaults timeout: @config.rpcs.receive_trigger_webhook.timeout,
1143
1159
  metadata: metadata,
1144
1160
  retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy
1145
- options.apply_defaults metadata: @config.metadata,
1161
+
1162
+ options.apply_defaults timeout: @config.timeout,
1163
+ metadata: @config.metadata,
1146
1164
  retry_policy: @config.retry_policy
1147
1165
 
1148
1166
  @cloud_build_stub.call_rpc :receive_trigger_webhook, request, options: options do |response, operation|
@@ -1154,9 +1172,7 @@ module Google
1154
1172
  end
1155
1173
 
1156
1174
  ##
1157
- # Creates a `WorkerPool` to run the builds, and returns the new worker pool.
1158
- #
1159
- # This API is experimental.
1175
+ # Creates a `WorkerPool`.
1160
1176
  #
1161
1177
  # @overload create_worker_pool(request, options = nil)
1162
1178
  # Pass arguments to `create_worker_pool` via a request object, either of type
@@ -1168,21 +1184,31 @@ module Google
1168
1184
  # @param options [::Gapic::CallOptions, ::Hash]
1169
1185
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1170
1186
  #
1171
- # @overload create_worker_pool(parent: nil, worker_pool: nil)
1187
+ # @overload create_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil)
1172
1188
  # Pass arguments to `create_worker_pool` via keyword arguments. Note that at
1173
1189
  # least one keyword argument is required. To specify no parameters, or to keep all
1174
1190
  # the default parameter values, pass an empty Hash as a request object (see above).
1175
1191
  #
1176
1192
  # @param parent [::String]
1177
- # ID of the parent project.
1193
+ # Required. The parent resource where this worker pool will be created.
1194
+ # Format: `projects/{project}/locations/{location}`.
1178
1195
  # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash]
1179
- # `WorkerPool` resource to create.
1196
+ # Required. `WorkerPool` resource to create.
1197
+ # @param worker_pool_id [::String]
1198
+ # Required. Immutable. The ID to use for the `WorkerPool`, which will become
1199
+ # the final component of the resource name.
1200
+ #
1201
+ # This value should be 1-63 characters, and valid characters
1202
+ # are /[a-z][0-9]-/.
1203
+ # @param validate_only [::Boolean]
1204
+ # If set, validate the request and preview the response, but do not actually
1205
+ # post it.
1180
1206
  #
1181
1207
  # @yield [response, operation] Access the result along with the RPC operation
1182
- # @yieldparam response [::Google::Cloud::Build::V1::WorkerPool]
1208
+ # @yieldparam response [::Gapic::Operation]
1183
1209
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1184
1210
  #
1185
- # @return [::Google::Cloud::Build::V1::WorkerPool]
1211
+ # @return [::Gapic::Operation]
1186
1212
  #
1187
1213
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1188
1214
  #
@@ -1203,13 +1229,22 @@ module Google
1203
1229
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1204
1230
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1205
1231
 
1232
+ header_params = {
1233
+ "parent" => request.parent
1234
+ }
1235
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1236
+ metadata[:"x-goog-request-params"] ||= request_params_header
1237
+
1206
1238
  options.apply_defaults timeout: @config.rpcs.create_worker_pool.timeout,
1207
1239
  metadata: metadata,
1208
1240
  retry_policy: @config.rpcs.create_worker_pool.retry_policy
1209
- options.apply_defaults metadata: @config.metadata,
1241
+
1242
+ options.apply_defaults timeout: @config.timeout,
1243
+ metadata: @config.metadata,
1210
1244
  retry_policy: @config.retry_policy
1211
1245
 
1212
1246
  @cloud_build_stub.call_rpc :create_worker_pool, request, options: options do |response, operation|
1247
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1213
1248
  yield response, operation if block_given?
1214
1249
  return response
1215
1250
  end
@@ -1218,9 +1253,7 @@ module Google
1218
1253
  end
1219
1254
 
1220
1255
  ##
1221
- # Returns information about a `WorkerPool`.
1222
- #
1223
- # This API is experimental.
1256
+ # Returns details of a `WorkerPool`.
1224
1257
  #
1225
1258
  # @overload get_worker_pool(request, options = nil)
1226
1259
  # Pass arguments to `get_worker_pool` via a request object, either of type
@@ -1238,8 +1271,8 @@ module Google
1238
1271
  # the default parameter values, pass an empty Hash as a request object (see above).
1239
1272
  #
1240
1273
  # @param name [::String]
1241
- # The field will contain name of the resource requested, for example:
1242
- # "projects/project-1/workerPools/workerpool-name"
1274
+ # Required. The name of the `WorkerPool` to retrieve.
1275
+ # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
1243
1276
  #
1244
1277
  # @yield [response, operation] Access the result along with the RPC operation
1245
1278
  # @yieldparam response [::Google::Cloud::Build::V1::WorkerPool]
@@ -1266,10 +1299,18 @@ module Google
1266
1299
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1267
1300
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1268
1301
 
1302
+ header_params = {
1303
+ "name" => request.name
1304
+ }
1305
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1306
+ metadata[:"x-goog-request-params"] ||= request_params_header
1307
+
1269
1308
  options.apply_defaults timeout: @config.rpcs.get_worker_pool.timeout,
1270
1309
  metadata: metadata,
1271
1310
  retry_policy: @config.rpcs.get_worker_pool.retry_policy
1272
- options.apply_defaults metadata: @config.metadata,
1311
+
1312
+ options.apply_defaults timeout: @config.timeout,
1313
+ metadata: @config.metadata,
1273
1314
  retry_policy: @config.retry_policy
1274
1315
 
1275
1316
  @cloud_build_stub.call_rpc :get_worker_pool, request, options: options do |response, operation|
@@ -1281,9 +1322,7 @@ module Google
1281
1322
  end
1282
1323
 
1283
1324
  ##
1284
- # Deletes a `WorkerPool` by its project ID and WorkerPool name.
1285
- #
1286
- # This API is experimental.
1325
+ # Deletes a `WorkerPool`.
1287
1326
  #
1288
1327
  # @overload delete_worker_pool(request, options = nil)
1289
1328
  # Pass arguments to `delete_worker_pool` via a request object, either of type
@@ -1295,20 +1334,30 @@ module Google
1295
1334
  # @param options [::Gapic::CallOptions, ::Hash]
1296
1335
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1297
1336
  #
1298
- # @overload delete_worker_pool(name: nil)
1337
+ # @overload delete_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
1299
1338
  # Pass arguments to `delete_worker_pool` via keyword arguments. Note that at
1300
1339
  # least one keyword argument is required. To specify no parameters, or to keep all
1301
1340
  # the default parameter values, pass an empty Hash as a request object (see above).
1302
1341
  #
1303
1342
  # @param name [::String]
1304
- # The field will contain name of the resource requested, for example:
1305
- # "projects/project-1/workerPools/workerpool-name"
1343
+ # Required. The name of the `WorkerPool` to delete.
1344
+ # Format:
1345
+ # `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.
1346
+ # @param etag [::String]
1347
+ # Optional. If this is provided, it must match the server's etag on the
1348
+ # workerpool for the request to be processed.
1349
+ # @param allow_missing [::Boolean]
1350
+ # If set to true, and the `WorkerPool` is not found, the request will succeed
1351
+ # but no action will be taken on the server.
1352
+ # @param validate_only [::Boolean]
1353
+ # If set, validate the request and preview the response, but do not actually
1354
+ # post it.
1306
1355
  #
1307
1356
  # @yield [response, operation] Access the result along with the RPC operation
1308
- # @yieldparam response [::Google::Protobuf::Empty]
1357
+ # @yieldparam response [::Gapic::Operation]
1309
1358
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1310
1359
  #
1311
- # @return [::Google::Protobuf::Empty]
1360
+ # @return [::Gapic::Operation]
1312
1361
  #
1313
1362
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1314
1363
  #
@@ -1329,13 +1378,22 @@ module Google
1329
1378
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1330
1379
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1331
1380
 
1381
+ header_params = {
1382
+ "name" => request.name
1383
+ }
1384
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1385
+ metadata[:"x-goog-request-params"] ||= request_params_header
1386
+
1332
1387
  options.apply_defaults timeout: @config.rpcs.delete_worker_pool.timeout,
1333
1388
  metadata: metadata,
1334
1389
  retry_policy: @config.rpcs.delete_worker_pool.retry_policy
1335
- options.apply_defaults metadata: @config.metadata,
1390
+
1391
+ options.apply_defaults timeout: @config.timeout,
1392
+ metadata: @config.metadata,
1336
1393
  retry_policy: @config.retry_policy
1337
1394
 
1338
1395
  @cloud_build_stub.call_rpc :delete_worker_pool, request, options: options do |response, operation|
1396
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1339
1397
  yield response, operation if block_given?
1340
1398
  return response
1341
1399
  end
@@ -1344,9 +1402,7 @@ module Google
1344
1402
  end
1345
1403
 
1346
1404
  ##
1347
- # Update a `WorkerPool`.
1348
- #
1349
- # This API is experimental.
1405
+ # Updates a `WorkerPool`.
1350
1406
  #
1351
1407
  # @overload update_worker_pool(request, options = nil)
1352
1408
  # Pass arguments to `update_worker_pool` via a request object, either of type
@@ -1358,22 +1414,27 @@ module Google
1358
1414
  # @param options [::Gapic::CallOptions, ::Hash]
1359
1415
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1360
1416
  #
1361
- # @overload update_worker_pool(name: nil, worker_pool: nil)
1417
+ # @overload update_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil)
1362
1418
  # Pass arguments to `update_worker_pool` via keyword arguments. Note that at
1363
1419
  # least one keyword argument is required. To specify no parameters, or to keep all
1364
1420
  # the default parameter values, pass an empty Hash as a request object (see above).
1365
1421
  #
1366
- # @param name [::String]
1367
- # The field will contain name of the resource requested, for example:
1368
- # "projects/project-1/workerPools/workerpool-name"
1369
1422
  # @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash]
1370
- # `WorkerPool` resource to update.
1423
+ # Required. The `WorkerPool` to update.
1424
+ #
1425
+ # The `name` field is used to identify the `WorkerPool` to update.
1426
+ # Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
1427
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1428
+ # A mask specifying which fields in `worker_pool` to update.
1429
+ # @param validate_only [::Boolean]
1430
+ # If set, validate the request and preview the response, but do not actually
1431
+ # post it.
1371
1432
  #
1372
1433
  # @yield [response, operation] Access the result along with the RPC operation
1373
- # @yieldparam response [::Google::Cloud::Build::V1::WorkerPool]
1434
+ # @yieldparam response [::Gapic::Operation]
1374
1435
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1375
1436
  #
1376
- # @return [::Google::Cloud::Build::V1::WorkerPool]
1437
+ # @return [::Gapic::Operation]
1377
1438
  #
1378
1439
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1379
1440
  #
@@ -1394,13 +1455,22 @@ module Google
1394
1455
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1395
1456
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1396
1457
 
1458
+ header_params = {
1459
+ "worker_pool.name" => request.worker_pool.name
1460
+ }
1461
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1462
+ metadata[:"x-goog-request-params"] ||= request_params_header
1463
+
1397
1464
  options.apply_defaults timeout: @config.rpcs.update_worker_pool.timeout,
1398
1465
  metadata: metadata,
1399
1466
  retry_policy: @config.rpcs.update_worker_pool.retry_policy
1400
- options.apply_defaults metadata: @config.metadata,
1467
+
1468
+ options.apply_defaults timeout: @config.timeout,
1469
+ metadata: @config.metadata,
1401
1470
  retry_policy: @config.retry_policy
1402
1471
 
1403
1472
  @cloud_build_stub.call_rpc :update_worker_pool, request, options: options do |response, operation|
1473
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1404
1474
  yield response, operation if block_given?
1405
1475
  return response
1406
1476
  end
@@ -1409,9 +1479,7 @@ module Google
1409
1479
  end
1410
1480
 
1411
1481
  ##
1412
- # List project's `WorkerPools`.
1413
- #
1414
- # This API is experimental.
1482
+ # Lists `WorkerPool`s.
1415
1483
  #
1416
1484
  # @overload list_worker_pools(request, options = nil)
1417
1485
  # Pass arguments to `list_worker_pools` via a request object, either of type
@@ -1423,19 +1491,26 @@ module Google
1423
1491
  # @param options [::Gapic::CallOptions, ::Hash]
1424
1492
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1425
1493
  #
1426
- # @overload list_worker_pools(parent: nil)
1494
+ # @overload list_worker_pools(parent: nil, page_size: nil, page_token: nil)
1427
1495
  # Pass arguments to `list_worker_pools` via keyword arguments. Note that at
1428
1496
  # least one keyword argument is required. To specify no parameters, or to keep all
1429
1497
  # the default parameter values, pass an empty Hash as a request object (see above).
1430
1498
  #
1431
1499
  # @param parent [::String]
1432
- # ID of the parent project.
1500
+ # Required. The parent of the collection of `WorkerPools`.
1501
+ # Format: `projects/{project}/locations/{location}`.
1502
+ # @param page_size [::Integer]
1503
+ # The maximum number of `WorkerPool`s to return. The service may return
1504
+ # fewer than this value. If omitted, the server will use a sensible default.
1505
+ # @param page_token [::String]
1506
+ # A page token, received from a previous `ListWorkerPools` call. Provide this
1507
+ # to retrieve the subsequent page.
1433
1508
  #
1434
1509
  # @yield [response, operation] Access the result along with the RPC operation
1435
- # @yieldparam response [::Google::Cloud::Build::V1::ListWorkerPoolsResponse]
1510
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>]
1436
1511
  # @yieldparam operation [::GRPC::ActiveCall::Operation]
1437
1512
  #
1438
- # @return [::Google::Cloud::Build::V1::ListWorkerPoolsResponse]
1513
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>]
1439
1514
  #
1440
1515
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1441
1516
  #
@@ -1456,13 +1531,22 @@ module Google
1456
1531
  gapic_version: ::Google::Cloud::Build::V1::VERSION
1457
1532
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1458
1533
 
1534
+ header_params = {
1535
+ "parent" => request.parent
1536
+ }
1537
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1538
+ metadata[:"x-goog-request-params"] ||= request_params_header
1539
+
1459
1540
  options.apply_defaults timeout: @config.rpcs.list_worker_pools.timeout,
1460
1541
  metadata: metadata,
1461
1542
  retry_policy: @config.rpcs.list_worker_pools.retry_policy
1462
- options.apply_defaults metadata: @config.metadata,
1543
+
1544
+ options.apply_defaults timeout: @config.timeout,
1545
+ metadata: @config.metadata,
1463
1546
  retry_policy: @config.retry_policy
1464
1547
 
1465
1548
  @cloud_build_stub.call_rpc :list_worker_pools, request, options: options do |response, operation|
1549
+ response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, request, response, operation, options
1466
1550
  yield response, operation if block_given?
1467
1551
  return response
1468
1552
  end
@@ -1483,22 +1567,21 @@ module Google
1483
1567
  # Configuration can be applied globally to all clients, or to a single client
1484
1568
  # on construction.
1485
1569
  #
1486
- # # Examples
1487
- #
1488
- # To modify the global config, setting the timeout for create_build
1489
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1490
- #
1491
- # ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config|
1492
- # config.timeout = 10.0
1493
- # config.rpcs.create_build.timeout = 20.0
1494
- # end
1495
- #
1496
- # To apply the above configuration only to a new client:
1497
- #
1498
- # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config|
1499
- # config.timeout = 10.0
1500
- # config.rpcs.create_build.timeout = 20.0
1501
- # end
1570
+ # @example
1571
+ #
1572
+ # # Modify the global config, setting the timeout for
1573
+ # # create_build to 20 seconds,
1574
+ # # and all remaining timeouts to 10 seconds.
1575
+ # ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config|
1576
+ # config.timeout = 10.0
1577
+ # config.rpcs.create_build.timeout = 20.0
1578
+ # end
1579
+ #
1580
+ # # Apply the above configuration only to a new client.
1581
+ # client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config|
1582
+ # config.timeout = 10.0
1583
+ # config.rpcs.create_build.timeout = 20.0
1584
+ # end
1502
1585
  #
1503
1586
  # @!attribute [rw] endpoint
1504
1587
  # The hostname or hostname:port of the service endpoint.