google-cloud-build-v1 0.8.1 → 0.10.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.
- checksums.yaml +4 -4
- data/lib/google/cloud/build/v1/cloud_build/client.rb +256 -89
- data/lib/google/cloud/build/v1/cloud_build/operations.rb +30 -21
- data/lib/google/cloud/build/v1/cloud_build/paths.rb +36 -0
- data/lib/google/cloud/build/v1/version.rb +1 -1
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +122 -33
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb +15 -18
- data/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +393 -124
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cd5bcabb5f8a6f69cbf6c06611f1a267f80d07eb13ea2ba8792e3580c4829ee
|
4
|
+
data.tar.gz: ce642880f7e6a974c5571cd6d9d14bd3b42b720dab01388b3f52a04c1a503aaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: add5feb686114a8e97dbdf6393e9e4c11d75caf301dd294994edf9832555227698248bf3b4a4909af92ab804489008d0b516f779fd8f5a2422eacb03977c353c
|
7
|
+
data.tar.gz: d5d5d9d4a211bd5f9d472f26d3264c6603b850be82d021c04ebae5db560eabb2940c04456bf7de570c396918b2b42d170772aa49af7ce1972ee222f610e8f0d6
|
@@ -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
|
-
#
|
51
|
+
# @example
|
52
52
|
#
|
53
|
-
#
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
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
|
-
#
|
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
|
-
#
|
165
|
-
#
|
158
|
+
# # Create a client using the default configuration
|
159
|
+
# client = ::Google::Cloud::Build::V1::CloudBuild::Client.new
|
166
160
|
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
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
|
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.
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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|
|
@@ -631,6 +635,83 @@ module Google
|
|
631
635
|
raise ::Google::Cloud::Error.from_error(e)
|
632
636
|
end
|
633
637
|
|
638
|
+
##
|
639
|
+
# Approves or rejects a pending build.
|
640
|
+
#
|
641
|
+
# If approved, the returned LRO will be analogous to the LRO returned from
|
642
|
+
# a CreateBuild call.
|
643
|
+
#
|
644
|
+
# If rejected, the returned LRO will be immediately done.
|
645
|
+
#
|
646
|
+
# @overload approve_build(request, options = nil)
|
647
|
+
# Pass arguments to `approve_build` via a request object, either of type
|
648
|
+
# {::Google::Cloud::Build::V1::ApproveBuildRequest} or an equivalent Hash.
|
649
|
+
#
|
650
|
+
# @param request [::Google::Cloud::Build::V1::ApproveBuildRequest, ::Hash]
|
651
|
+
# A request object representing the call parameters. Required. To specify no
|
652
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
653
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
654
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
655
|
+
#
|
656
|
+
# @overload approve_build(name: nil, approval_result: nil)
|
657
|
+
# Pass arguments to `approve_build` via keyword arguments. Note that at
|
658
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
659
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
660
|
+
#
|
661
|
+
# @param name [::String]
|
662
|
+
# Required. Name of the target build.
|
663
|
+
# For example: "projects/\\{$project_id}/builds/\\{$build_id}"
|
664
|
+
# @param approval_result [::Google::Cloud::Build::V1::ApprovalResult, ::Hash]
|
665
|
+
# Approval decision and metadata.
|
666
|
+
#
|
667
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
668
|
+
# @yieldparam response [::Gapic::Operation]
|
669
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
670
|
+
#
|
671
|
+
# @return [::Gapic::Operation]
|
672
|
+
#
|
673
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
674
|
+
#
|
675
|
+
def approve_build request, options = nil
|
676
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
677
|
+
|
678
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Build::V1::ApproveBuildRequest
|
679
|
+
|
680
|
+
# Converts hash and nil to an options object
|
681
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
682
|
+
|
683
|
+
# Customize the options with defaults
|
684
|
+
metadata = @config.rpcs.approve_build.metadata.to_h
|
685
|
+
|
686
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
687
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
688
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
689
|
+
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
690
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
691
|
+
|
692
|
+
header_params = {
|
693
|
+
"name" => request.name
|
694
|
+
}
|
695
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
696
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
697
|
+
|
698
|
+
options.apply_defaults timeout: @config.rpcs.approve_build.timeout,
|
699
|
+
metadata: metadata,
|
700
|
+
retry_policy: @config.rpcs.approve_build.retry_policy
|
701
|
+
|
702
|
+
options.apply_defaults timeout: @config.timeout,
|
703
|
+
metadata: @config.metadata,
|
704
|
+
retry_policy: @config.retry_policy
|
705
|
+
|
706
|
+
@cloud_build_stub.call_rpc :approve_build, request, options: options do |response, operation|
|
707
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
708
|
+
yield response, operation if block_given?
|
709
|
+
return response
|
710
|
+
end
|
711
|
+
rescue ::GRPC::BadStatus => e
|
712
|
+
raise ::Google::Cloud::Error.from_error(e)
|
713
|
+
end
|
714
|
+
|
634
715
|
##
|
635
716
|
# Creates a new `BuildTrigger`.
|
636
717
|
#
|
@@ -693,7 +774,9 @@ module Google
|
|
693
774
|
options.apply_defaults timeout: @config.rpcs.create_build_trigger.timeout,
|
694
775
|
metadata: metadata,
|
695
776
|
retry_policy: @config.rpcs.create_build_trigger.retry_policy
|
696
|
-
|
777
|
+
|
778
|
+
options.apply_defaults timeout: @config.timeout,
|
779
|
+
metadata: @config.metadata,
|
697
780
|
retry_policy: @config.retry_policy
|
698
781
|
|
699
782
|
@cloud_build_stub.call_rpc :create_build_trigger, request, options: options do |response, operation|
|
@@ -767,7 +850,9 @@ module Google
|
|
767
850
|
options.apply_defaults timeout: @config.rpcs.get_build_trigger.timeout,
|
768
851
|
metadata: metadata,
|
769
852
|
retry_policy: @config.rpcs.get_build_trigger.retry_policy
|
770
|
-
|
853
|
+
|
854
|
+
options.apply_defaults timeout: @config.timeout,
|
855
|
+
metadata: @config.metadata,
|
771
856
|
retry_policy: @config.retry_policy
|
772
857
|
|
773
858
|
@cloud_build_stub.call_rpc :get_build_trigger, request, options: options do |response, operation|
|
@@ -842,7 +927,9 @@ module Google
|
|
842
927
|
options.apply_defaults timeout: @config.rpcs.list_build_triggers.timeout,
|
843
928
|
metadata: metadata,
|
844
929
|
retry_policy: @config.rpcs.list_build_triggers.retry_policy
|
845
|
-
|
930
|
+
|
931
|
+
options.apply_defaults timeout: @config.timeout,
|
932
|
+
metadata: @config.metadata,
|
846
933
|
retry_policy: @config.retry_policy
|
847
934
|
|
848
935
|
@cloud_build_stub.call_rpc :list_build_triggers, request, options: options do |response, operation|
|
@@ -917,7 +1004,9 @@ module Google
|
|
917
1004
|
options.apply_defaults timeout: @config.rpcs.delete_build_trigger.timeout,
|
918
1005
|
metadata: metadata,
|
919
1006
|
retry_policy: @config.rpcs.delete_build_trigger.retry_policy
|
920
|
-
|
1007
|
+
|
1008
|
+
options.apply_defaults timeout: @config.timeout,
|
1009
|
+
metadata: @config.metadata,
|
921
1010
|
retry_policy: @config.retry_policy
|
922
1011
|
|
923
1012
|
@cloud_build_stub.call_rpc :delete_build_trigger, request, options: options do |response, operation|
|
@@ -990,7 +1079,9 @@ module Google
|
|
990
1079
|
options.apply_defaults timeout: @config.rpcs.update_build_trigger.timeout,
|
991
1080
|
metadata: metadata,
|
992
1081
|
retry_policy: @config.rpcs.update_build_trigger.retry_policy
|
993
|
-
|
1082
|
+
|
1083
|
+
options.apply_defaults timeout: @config.timeout,
|
1084
|
+
metadata: @config.metadata,
|
994
1085
|
retry_policy: @config.retry_policy
|
995
1086
|
|
996
1087
|
@cloud_build_stub.call_rpc :update_build_trigger, request, options: options do |response, operation|
|
@@ -1064,7 +1155,9 @@ module Google
|
|
1064
1155
|
options.apply_defaults timeout: @config.rpcs.run_build_trigger.timeout,
|
1065
1156
|
metadata: metadata,
|
1066
1157
|
retry_policy: @config.rpcs.run_build_trigger.retry_policy
|
1067
|
-
|
1158
|
+
|
1159
|
+
options.apply_defaults timeout: @config.timeout,
|
1160
|
+
metadata: @config.metadata,
|
1068
1161
|
retry_policy: @config.retry_policy
|
1069
1162
|
|
1070
1163
|
@cloud_build_stub.call_rpc :run_build_trigger, request, options: options do |response, operation|
|
@@ -1142,7 +1235,9 @@ module Google
|
|
1142
1235
|
options.apply_defaults timeout: @config.rpcs.receive_trigger_webhook.timeout,
|
1143
1236
|
metadata: metadata,
|
1144
1237
|
retry_policy: @config.rpcs.receive_trigger_webhook.retry_policy
|
1145
|
-
|
1238
|
+
|
1239
|
+
options.apply_defaults timeout: @config.timeout,
|
1240
|
+
metadata: @config.metadata,
|
1146
1241
|
retry_policy: @config.retry_policy
|
1147
1242
|
|
1148
1243
|
@cloud_build_stub.call_rpc :receive_trigger_webhook, request, options: options do |response, operation|
|
@@ -1154,9 +1249,7 @@ module Google
|
|
1154
1249
|
end
|
1155
1250
|
|
1156
1251
|
##
|
1157
|
-
# Creates a `WorkerPool
|
1158
|
-
#
|
1159
|
-
# This API is experimental.
|
1252
|
+
# Creates a `WorkerPool`.
|
1160
1253
|
#
|
1161
1254
|
# @overload create_worker_pool(request, options = nil)
|
1162
1255
|
# Pass arguments to `create_worker_pool` via a request object, either of type
|
@@ -1168,21 +1261,31 @@ module Google
|
|
1168
1261
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1169
1262
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1170
1263
|
#
|
1171
|
-
# @overload create_worker_pool(parent: nil, worker_pool: nil)
|
1264
|
+
# @overload create_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil)
|
1172
1265
|
# Pass arguments to `create_worker_pool` via keyword arguments. Note that at
|
1173
1266
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1174
1267
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1175
1268
|
#
|
1176
1269
|
# @param parent [::String]
|
1177
|
-
#
|
1270
|
+
# Required. The parent resource where this worker pool will be created.
|
1271
|
+
# Format: `projects/{project}/locations/{location}`.
|
1178
1272
|
# @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash]
|
1179
|
-
# `WorkerPool` resource to create.
|
1273
|
+
# Required. `WorkerPool` resource to create.
|
1274
|
+
# @param worker_pool_id [::String]
|
1275
|
+
# Required. Immutable. The ID to use for the `WorkerPool`, which will become
|
1276
|
+
# the final component of the resource name.
|
1277
|
+
#
|
1278
|
+
# This value should be 1-63 characters, and valid characters
|
1279
|
+
# are /[a-z][0-9]-/.
|
1280
|
+
# @param validate_only [::Boolean]
|
1281
|
+
# If set, validate the request and preview the response, but do not actually
|
1282
|
+
# post it.
|
1180
1283
|
#
|
1181
1284
|
# @yield [response, operation] Access the result along with the RPC operation
|
1182
|
-
# @yieldparam response [::
|
1285
|
+
# @yieldparam response [::Gapic::Operation]
|
1183
1286
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1184
1287
|
#
|
1185
|
-
# @return [::
|
1288
|
+
# @return [::Gapic::Operation]
|
1186
1289
|
#
|
1187
1290
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1188
1291
|
#
|
@@ -1203,13 +1306,22 @@ module Google
|
|
1203
1306
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1204
1307
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1205
1308
|
|
1309
|
+
header_params = {
|
1310
|
+
"parent" => request.parent
|
1311
|
+
}
|
1312
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1313
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1314
|
+
|
1206
1315
|
options.apply_defaults timeout: @config.rpcs.create_worker_pool.timeout,
|
1207
1316
|
metadata: metadata,
|
1208
1317
|
retry_policy: @config.rpcs.create_worker_pool.retry_policy
|
1209
|
-
|
1318
|
+
|
1319
|
+
options.apply_defaults timeout: @config.timeout,
|
1320
|
+
metadata: @config.metadata,
|
1210
1321
|
retry_policy: @config.retry_policy
|
1211
1322
|
|
1212
1323
|
@cloud_build_stub.call_rpc :create_worker_pool, request, options: options do |response, operation|
|
1324
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1213
1325
|
yield response, operation if block_given?
|
1214
1326
|
return response
|
1215
1327
|
end
|
@@ -1218,9 +1330,7 @@ module Google
|
|
1218
1330
|
end
|
1219
1331
|
|
1220
1332
|
##
|
1221
|
-
# Returns
|
1222
|
-
#
|
1223
|
-
# This API is experimental.
|
1333
|
+
# Returns details of a `WorkerPool`.
|
1224
1334
|
#
|
1225
1335
|
# @overload get_worker_pool(request, options = nil)
|
1226
1336
|
# Pass arguments to `get_worker_pool` via a request object, either of type
|
@@ -1238,8 +1348,8 @@ module Google
|
|
1238
1348
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1239
1349
|
#
|
1240
1350
|
# @param name [::String]
|
1241
|
-
# The
|
1242
|
-
#
|
1351
|
+
# Required. The name of the `WorkerPool` to retrieve.
|
1352
|
+
# Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
|
1243
1353
|
#
|
1244
1354
|
# @yield [response, operation] Access the result along with the RPC operation
|
1245
1355
|
# @yieldparam response [::Google::Cloud::Build::V1::WorkerPool]
|
@@ -1266,10 +1376,18 @@ module Google
|
|
1266
1376
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1267
1377
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1268
1378
|
|
1379
|
+
header_params = {
|
1380
|
+
"name" => request.name
|
1381
|
+
}
|
1382
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1383
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1384
|
+
|
1269
1385
|
options.apply_defaults timeout: @config.rpcs.get_worker_pool.timeout,
|
1270
1386
|
metadata: metadata,
|
1271
1387
|
retry_policy: @config.rpcs.get_worker_pool.retry_policy
|
1272
|
-
|
1388
|
+
|
1389
|
+
options.apply_defaults timeout: @config.timeout,
|
1390
|
+
metadata: @config.metadata,
|
1273
1391
|
retry_policy: @config.retry_policy
|
1274
1392
|
|
1275
1393
|
@cloud_build_stub.call_rpc :get_worker_pool, request, options: options do |response, operation|
|
@@ -1281,9 +1399,7 @@ module Google
|
|
1281
1399
|
end
|
1282
1400
|
|
1283
1401
|
##
|
1284
|
-
# Deletes a `WorkerPool
|
1285
|
-
#
|
1286
|
-
# This API is experimental.
|
1402
|
+
# Deletes a `WorkerPool`.
|
1287
1403
|
#
|
1288
1404
|
# @overload delete_worker_pool(request, options = nil)
|
1289
1405
|
# Pass arguments to `delete_worker_pool` via a request object, either of type
|
@@ -1295,20 +1411,30 @@ module Google
|
|
1295
1411
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1296
1412
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1297
1413
|
#
|
1298
|
-
# @overload delete_worker_pool(name: nil)
|
1414
|
+
# @overload delete_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
|
1299
1415
|
# Pass arguments to `delete_worker_pool` via keyword arguments. Note that at
|
1300
1416
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1301
1417
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1302
1418
|
#
|
1303
1419
|
# @param name [::String]
|
1304
|
-
# The
|
1305
|
-
#
|
1420
|
+
# Required. The name of the `WorkerPool` to delete.
|
1421
|
+
# Format:
|
1422
|
+
# `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.
|
1423
|
+
# @param etag [::String]
|
1424
|
+
# Optional. If this is provided, it must match the server's etag on the
|
1425
|
+
# workerpool for the request to be processed.
|
1426
|
+
# @param allow_missing [::Boolean]
|
1427
|
+
# If set to true, and the `WorkerPool` is not found, the request will succeed
|
1428
|
+
# but no action will be taken on the server.
|
1429
|
+
# @param validate_only [::Boolean]
|
1430
|
+
# If set, validate the request and preview the response, but do not actually
|
1431
|
+
# post it.
|
1306
1432
|
#
|
1307
1433
|
# @yield [response, operation] Access the result along with the RPC operation
|
1308
|
-
# @yieldparam response [::
|
1434
|
+
# @yieldparam response [::Gapic::Operation]
|
1309
1435
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1310
1436
|
#
|
1311
|
-
# @return [::
|
1437
|
+
# @return [::Gapic::Operation]
|
1312
1438
|
#
|
1313
1439
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1314
1440
|
#
|
@@ -1329,13 +1455,22 @@ module Google
|
|
1329
1455
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1330
1456
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1331
1457
|
|
1458
|
+
header_params = {
|
1459
|
+
"name" => request.name
|
1460
|
+
}
|
1461
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1462
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1463
|
+
|
1332
1464
|
options.apply_defaults timeout: @config.rpcs.delete_worker_pool.timeout,
|
1333
1465
|
metadata: metadata,
|
1334
1466
|
retry_policy: @config.rpcs.delete_worker_pool.retry_policy
|
1335
|
-
|
1467
|
+
|
1468
|
+
options.apply_defaults timeout: @config.timeout,
|
1469
|
+
metadata: @config.metadata,
|
1336
1470
|
retry_policy: @config.retry_policy
|
1337
1471
|
|
1338
1472
|
@cloud_build_stub.call_rpc :delete_worker_pool, request, options: options do |response, operation|
|
1473
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1339
1474
|
yield response, operation if block_given?
|
1340
1475
|
return response
|
1341
1476
|
end
|
@@ -1344,9 +1479,7 @@ module Google
|
|
1344
1479
|
end
|
1345
1480
|
|
1346
1481
|
##
|
1347
|
-
#
|
1348
|
-
#
|
1349
|
-
# This API is experimental.
|
1482
|
+
# Updates a `WorkerPool`.
|
1350
1483
|
#
|
1351
1484
|
# @overload update_worker_pool(request, options = nil)
|
1352
1485
|
# Pass arguments to `update_worker_pool` via a request object, either of type
|
@@ -1358,22 +1491,27 @@ module Google
|
|
1358
1491
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1359
1492
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1360
1493
|
#
|
1361
|
-
# @overload update_worker_pool(
|
1494
|
+
# @overload update_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil)
|
1362
1495
|
# Pass arguments to `update_worker_pool` via keyword arguments. Note that at
|
1363
1496
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1364
1497
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1365
1498
|
#
|
1366
|
-
# @param name [::String]
|
1367
|
-
# The field will contain name of the resource requested, for example:
|
1368
|
-
# "projects/project-1/workerPools/workerpool-name"
|
1369
1499
|
# @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash]
|
1370
|
-
# `WorkerPool`
|
1500
|
+
# Required. The `WorkerPool` to update.
|
1501
|
+
#
|
1502
|
+
# The `name` field is used to identify the `WorkerPool` to update.
|
1503
|
+
# Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
|
1504
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1505
|
+
# A mask specifying which fields in `worker_pool` to update.
|
1506
|
+
# @param validate_only [::Boolean]
|
1507
|
+
# If set, validate the request and preview the response, but do not actually
|
1508
|
+
# post it.
|
1371
1509
|
#
|
1372
1510
|
# @yield [response, operation] Access the result along with the RPC operation
|
1373
|
-
# @yieldparam response [::
|
1511
|
+
# @yieldparam response [::Gapic::Operation]
|
1374
1512
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1375
1513
|
#
|
1376
|
-
# @return [::
|
1514
|
+
# @return [::Gapic::Operation]
|
1377
1515
|
#
|
1378
1516
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1379
1517
|
#
|
@@ -1394,13 +1532,22 @@ module Google
|
|
1394
1532
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1395
1533
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1396
1534
|
|
1535
|
+
header_params = {
|
1536
|
+
"worker_pool.name" => request.worker_pool.name
|
1537
|
+
}
|
1538
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1539
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1540
|
+
|
1397
1541
|
options.apply_defaults timeout: @config.rpcs.update_worker_pool.timeout,
|
1398
1542
|
metadata: metadata,
|
1399
1543
|
retry_policy: @config.rpcs.update_worker_pool.retry_policy
|
1400
|
-
|
1544
|
+
|
1545
|
+
options.apply_defaults timeout: @config.timeout,
|
1546
|
+
metadata: @config.metadata,
|
1401
1547
|
retry_policy: @config.retry_policy
|
1402
1548
|
|
1403
1549
|
@cloud_build_stub.call_rpc :update_worker_pool, request, options: options do |response, operation|
|
1550
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1404
1551
|
yield response, operation if block_given?
|
1405
1552
|
return response
|
1406
1553
|
end
|
@@ -1409,9 +1556,7 @@ module Google
|
|
1409
1556
|
end
|
1410
1557
|
|
1411
1558
|
##
|
1412
|
-
#
|
1413
|
-
#
|
1414
|
-
# This API is experimental.
|
1559
|
+
# Lists `WorkerPool`s.
|
1415
1560
|
#
|
1416
1561
|
# @overload list_worker_pools(request, options = nil)
|
1417
1562
|
# Pass arguments to `list_worker_pools` via a request object, either of type
|
@@ -1423,19 +1568,26 @@ module Google
|
|
1423
1568
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1424
1569
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1425
1570
|
#
|
1426
|
-
# @overload list_worker_pools(parent: nil)
|
1571
|
+
# @overload list_worker_pools(parent: nil, page_size: nil, page_token: nil)
|
1427
1572
|
# Pass arguments to `list_worker_pools` via keyword arguments. Note that at
|
1428
1573
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1429
1574
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1430
1575
|
#
|
1431
1576
|
# @param parent [::String]
|
1432
|
-
#
|
1577
|
+
# Required. The parent of the collection of `WorkerPools`.
|
1578
|
+
# Format: `projects/{project}/locations/{location}`.
|
1579
|
+
# @param page_size [::Integer]
|
1580
|
+
# The maximum number of `WorkerPool`s to return. The service may return
|
1581
|
+
# fewer than this value. If omitted, the server will use a sensible default.
|
1582
|
+
# @param page_token [::String]
|
1583
|
+
# A page token, received from a previous `ListWorkerPools` call. Provide this
|
1584
|
+
# to retrieve the subsequent page.
|
1433
1585
|
#
|
1434
1586
|
# @yield [response, operation] Access the result along with the RPC operation
|
1435
|
-
# @yieldparam response [::Google::Cloud::Build::V1::
|
1587
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>]
|
1436
1588
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1437
1589
|
#
|
1438
|
-
# @return [::Google::Cloud::Build::V1::
|
1590
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>]
|
1439
1591
|
#
|
1440
1592
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1441
1593
|
#
|
@@ -1456,13 +1608,22 @@ module Google
|
|
1456
1608
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1457
1609
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1458
1610
|
|
1611
|
+
header_params = {
|
1612
|
+
"parent" => request.parent
|
1613
|
+
}
|
1614
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1615
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1616
|
+
|
1459
1617
|
options.apply_defaults timeout: @config.rpcs.list_worker_pools.timeout,
|
1460
1618
|
metadata: metadata,
|
1461
1619
|
retry_policy: @config.rpcs.list_worker_pools.retry_policy
|
1462
|
-
|
1620
|
+
|
1621
|
+
options.apply_defaults timeout: @config.timeout,
|
1622
|
+
metadata: @config.metadata,
|
1463
1623
|
retry_policy: @config.retry_policy
|
1464
1624
|
|
1465
1625
|
@cloud_build_stub.call_rpc :list_worker_pools, request, options: options do |response, operation|
|
1626
|
+
response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, request, response, operation, options
|
1466
1627
|
yield response, operation if block_given?
|
1467
1628
|
return response
|
1468
1629
|
end
|
@@ -1483,22 +1644,21 @@ module Google
|
|
1483
1644
|
# Configuration can be applied globally to all clients, or to a single client
|
1484
1645
|
# on construction.
|
1485
1646
|
#
|
1486
|
-
#
|
1487
|
-
#
|
1488
|
-
# To modify the global config, setting the timeout for create_build
|
1489
|
-
# to 20 seconds, and all remaining timeouts to 10 seconds:
|
1647
|
+
# @example
|
1490
1648
|
#
|
1491
|
-
#
|
1492
|
-
#
|
1493
|
-
#
|
1494
|
-
#
|
1649
|
+
# # Modify the global config, setting the timeout for
|
1650
|
+
# # create_build to 20 seconds,
|
1651
|
+
# # and all remaining timeouts to 10 seconds.
|
1652
|
+
# ::Google::Cloud::Build::V1::CloudBuild::Client.configure do |config|
|
1653
|
+
# config.timeout = 10.0
|
1654
|
+
# config.rpcs.create_build.timeout = 20.0
|
1655
|
+
# end
|
1495
1656
|
#
|
1496
|
-
#
|
1497
|
-
#
|
1498
|
-
#
|
1499
|
-
#
|
1500
|
-
#
|
1501
|
-
# end
|
1657
|
+
# # Apply the above configuration only to a new client.
|
1658
|
+
# client = ::Google::Cloud::Build::V1::CloudBuild::Client.new do |config|
|
1659
|
+
# config.timeout = 10.0
|
1660
|
+
# config.rpcs.create_build.timeout = 20.0
|
1661
|
+
# end
|
1502
1662
|
#
|
1503
1663
|
# @!attribute [rw] endpoint
|
1504
1664
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1632,6 +1792,11 @@ module Google
|
|
1632
1792
|
#
|
1633
1793
|
attr_reader :retry_build
|
1634
1794
|
##
|
1795
|
+
# RPC-specific configuration for `approve_build`
|
1796
|
+
# @return [::Gapic::Config::Method]
|
1797
|
+
#
|
1798
|
+
attr_reader :approve_build
|
1799
|
+
##
|
1635
1800
|
# RPC-specific configuration for `create_build_trigger`
|
1636
1801
|
# @return [::Gapic::Config::Method]
|
1637
1802
|
#
|
@@ -1704,6 +1869,8 @@ module Google
|
|
1704
1869
|
@cancel_build = ::Gapic::Config::Method.new cancel_build_config
|
1705
1870
|
retry_build_config = parent_rpcs.retry_build if parent_rpcs.respond_to? :retry_build
|
1706
1871
|
@retry_build = ::Gapic::Config::Method.new retry_build_config
|
1872
|
+
approve_build_config = parent_rpcs.approve_build if parent_rpcs.respond_to? :approve_build
|
1873
|
+
@approve_build = ::Gapic::Config::Method.new approve_build_config
|
1707
1874
|
create_build_trigger_config = parent_rpcs.create_build_trigger if parent_rpcs.respond_to? :create_build_trigger
|
1708
1875
|
@create_build_trigger = ::Gapic::Config::Method.new create_build_trigger_config
|
1709
1876
|
get_build_trigger_config = parent_rpcs.get_build_trigger if parent_rpcs.respond_to? :get_build_trigger
|