google-cloud-build-v1 0.7.1 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -8
- data/README.md +1 -1
- data/lib/google/cloud/build/v1/cloud_build/client.rb +126 -73
- data/lib/google/cloud/build/v1/cloud_build/operations.rb +4 -4
- data/lib/google/cloud/build/v1/cloud_build/paths.rb +67 -7
- data/lib/google/cloud/build/v1/version.rb +1 -1
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +118 -33
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_services_pb.rb +9 -19
- data/proto_docs/google/api/field_behavior.rb +7 -1
- data/proto_docs/google/api/httpbody.rb +4 -3
- data/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +395 -129
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87cec34b3731a8422b8838c88036bde083c01d8d518bb75a807bbfccfb4ec186
|
4
|
+
data.tar.gz: '09a5c66fe71145e489ba71d0f14c2dd191cdebc4f26b0539b88da82543f92914'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d1ea8844ac6b8ddafc48c0320523250b53cbbf767cb84ba91146dbe04993a82c083f15e93f914e51b00f41300df810e0b32a9befdace9c8a9b93b2f55d85e4f
|
7
|
+
data.tar.gz: c58f87a4fd938763d066b609e14871062b7e56d24c5c984a46e60d746b81ac64db3d8809cec0fd70172fbaa412cede34687123db854db545fe4371342d7523f6
|
data/AUTHENTICATION.md
CHANGED
@@ -66,11 +66,11 @@ The environment variables that google-cloud-build-v1
|
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
67
|
{::Google::Cloud::Build::V1::CloudBuild::Credentials}):
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
* `CLOUD_BUILD_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
|
+
* `CLOUD_BUILD_KEYFILE` - Path to JSON file, or JSON contents
|
71
|
+
* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents
|
72
|
+
* `GOOGLE_CLOUD_KEYFILE` - Path to JSON file, or JSON contents
|
73
|
+
* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file
|
74
74
|
|
75
75
|
```ruby
|
76
76
|
require "google/cloud/build/v1"
|
@@ -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
|
86
|
-
environment
|
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
|
96
|
+
Or globally for all clients:
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
require "google/cloud/build/v1"
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ In order to use this library, you first need to go through the following steps:
|
|
33
33
|
require "google/cloud/build/v1"
|
34
34
|
|
35
35
|
client = ::Google::Cloud::Build::V1::CloudBuild::Client.new
|
36
|
-
request =
|
36
|
+
request = ::Google::Cloud::Build::V1::CreateBuildRequest.new # (request fields as keyword arguments...)
|
37
37
|
response = client.create_build request
|
38
38
|
```
|
39
39
|
|
@@ -76,18 +76,12 @@ module Google
|
|
76
76
|
|
77
77
|
default_config.rpcs.get_build.timeout = 600.0
|
78
78
|
default_config.rpcs.get_build.retry_policy = {
|
79
|
-
initial_delay: 0.1,
|
80
|
-
max_delay: 60.0,
|
81
|
-
multiplier: 1.3,
|
82
|
-
retry_codes: [14, 4]
|
79
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
83
80
|
}
|
84
81
|
|
85
82
|
default_config.rpcs.list_builds.timeout = 600.0
|
86
83
|
default_config.rpcs.list_builds.retry_policy = {
|
87
|
-
initial_delay: 0.1,
|
88
|
-
max_delay: 60.0,
|
89
|
-
multiplier: 1.3,
|
90
|
-
retry_codes: [14, 4]
|
84
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
91
85
|
}
|
92
86
|
|
93
87
|
default_config.rpcs.cancel_build.timeout = 600.0
|
@@ -98,26 +92,17 @@ module Google
|
|
98
92
|
|
99
93
|
default_config.rpcs.get_build_trigger.timeout = 600.0
|
100
94
|
default_config.rpcs.get_build_trigger.retry_policy = {
|
101
|
-
initial_delay: 0.1,
|
102
|
-
max_delay: 60.0,
|
103
|
-
multiplier: 1.3,
|
104
|
-
retry_codes: [14, 4]
|
95
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
105
96
|
}
|
106
97
|
|
107
98
|
default_config.rpcs.list_build_triggers.timeout = 600.0
|
108
99
|
default_config.rpcs.list_build_triggers.retry_policy = {
|
109
|
-
initial_delay: 0.1,
|
110
|
-
max_delay: 60.0,
|
111
|
-
multiplier: 1.3,
|
112
|
-
retry_codes: [14, 4]
|
100
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
113
101
|
}
|
114
102
|
|
115
103
|
default_config.rpcs.delete_build_trigger.timeout = 600.0
|
116
104
|
default_config.rpcs.delete_build_trigger.retry_policy = {
|
117
|
-
initial_delay: 0.1,
|
118
|
-
max_delay: 60.0,
|
119
|
-
multiplier: 1.3,
|
120
|
-
retry_codes: [14, 4]
|
105
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
121
106
|
}
|
122
107
|
|
123
108
|
default_config.rpcs.update_build_trigger.timeout = 600.0
|
@@ -128,10 +113,7 @@ module Google
|
|
128
113
|
|
129
114
|
default_config.rpcs.get_worker_pool.timeout = 600.0
|
130
115
|
default_config.rpcs.get_worker_pool.retry_policy = {
|
131
|
-
initial_delay: 0.1,
|
132
|
-
max_delay: 60.0,
|
133
|
-
multiplier: 1.3,
|
134
|
-
retry_codes: [14, 4]
|
116
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
135
117
|
}
|
136
118
|
|
137
119
|
default_config.rpcs.delete_worker_pool.timeout = 600.0
|
@@ -140,10 +122,7 @@ module Google
|
|
140
122
|
|
141
123
|
default_config.rpcs.list_worker_pools.timeout = 600.0
|
142
124
|
default_config.rpcs.list_worker_pools.retry_policy = {
|
143
|
-
initial_delay: 0.1,
|
144
|
-
max_delay: 60.0,
|
145
|
-
multiplier: 1.3,
|
146
|
-
retry_codes: [14, 4]
|
125
|
+
initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4]
|
147
126
|
}
|
148
127
|
|
149
128
|
default_config
|
@@ -214,7 +193,7 @@ module Google
|
|
214
193
|
!@config.endpoint.split(".").first.include?("-")
|
215
194
|
credentials ||= Credentials.default scope: @config.scope,
|
216
195
|
enable_self_signed_jwt: enable_self_signed_jwt
|
217
|
-
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
196
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
218
197
|
credentials = Credentials.new credentials, scope: @config.scope
|
219
198
|
end
|
220
199
|
@quota_project_id = @config.quota_project
|
@@ -667,11 +646,14 @@ module Google
|
|
667
646
|
# @param options [::Gapic::CallOptions, ::Hash]
|
668
647
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
669
648
|
#
|
670
|
-
# @overload create_build_trigger(project_id: nil, trigger: nil)
|
649
|
+
# @overload create_build_trigger(parent: nil, project_id: nil, trigger: nil)
|
671
650
|
# Pass arguments to `create_build_trigger` via keyword arguments. Note that at
|
672
651
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
673
652
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
674
653
|
#
|
654
|
+
# @param parent [::String]
|
655
|
+
# The parent resource where this trigger will be created.
|
656
|
+
# Format: `projects/{project}/locations/{location}`
|
675
657
|
# @param project_id [::String]
|
676
658
|
# Required. ID of the project for which to configure automatic builds.
|
677
659
|
# @param trigger [::Google::Cloud::Build::V1::BuildTrigger, ::Hash]
|
@@ -737,11 +719,14 @@ module Google
|
|
737
719
|
# @param options [::Gapic::CallOptions, ::Hash]
|
738
720
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
739
721
|
#
|
740
|
-
# @overload get_build_trigger(project_id: nil, trigger_id: nil)
|
722
|
+
# @overload get_build_trigger(name: nil, project_id: nil, trigger_id: nil)
|
741
723
|
# Pass arguments to `get_build_trigger` via keyword arguments. Note that at
|
742
724
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
743
725
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
744
726
|
#
|
727
|
+
# @param name [::String]
|
728
|
+
# The name of the `Trigger` to retrieve.
|
729
|
+
# Format: `projects/{project}/locations/{location}/triggers/{trigger}`
|
745
730
|
# @param project_id [::String]
|
746
731
|
# Required. ID of the project that owns the trigger.
|
747
732
|
# @param trigger_id [::String]
|
@@ -808,11 +793,14 @@ module Google
|
|
808
793
|
# @param options [::Gapic::CallOptions, ::Hash]
|
809
794
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
810
795
|
#
|
811
|
-
# @overload list_build_triggers(project_id: nil, page_size: nil, page_token: nil)
|
796
|
+
# @overload list_build_triggers(parent: nil, project_id: nil, page_size: nil, page_token: nil)
|
812
797
|
# Pass arguments to `list_build_triggers` via keyword arguments. Note that at
|
813
798
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
814
799
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
815
800
|
#
|
801
|
+
# @param parent [::String]
|
802
|
+
# The parent of the collection of `Triggers`.
|
803
|
+
# Format: `projects/{project}/locations/{location}`
|
816
804
|
# @param project_id [::String]
|
817
805
|
# Required. ID of the project for which to list BuildTriggers.
|
818
806
|
# @param page_size [::Integer]
|
@@ -881,11 +869,14 @@ module Google
|
|
881
869
|
# @param options [::Gapic::CallOptions, ::Hash]
|
882
870
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
883
871
|
#
|
884
|
-
# @overload delete_build_trigger(project_id: nil, trigger_id: nil)
|
872
|
+
# @overload delete_build_trigger(name: nil, project_id: nil, trigger_id: nil)
|
885
873
|
# Pass arguments to `delete_build_trigger` via keyword arguments. Note that at
|
886
874
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
887
875
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
888
876
|
#
|
877
|
+
# @param name [::String]
|
878
|
+
# The name of the `Trigger` to delete.
|
879
|
+
# Format: `projects/{project}/locations/{location}/triggers/{trigger}`
|
889
880
|
# @param project_id [::String]
|
890
881
|
# Required. ID of the project that owns the trigger.
|
891
882
|
# @param trigger_id [::String]
|
@@ -1023,11 +1014,14 @@ module Google
|
|
1023
1014
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1024
1015
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1025
1016
|
#
|
1026
|
-
# @overload run_build_trigger(project_id: nil, trigger_id: nil, source: nil)
|
1017
|
+
# @overload run_build_trigger(name: nil, project_id: nil, trigger_id: nil, source: nil)
|
1027
1018
|
# Pass arguments to `run_build_trigger` via keyword arguments. Note that at
|
1028
1019
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1029
1020
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1030
1021
|
#
|
1022
|
+
# @param name [::String]
|
1023
|
+
# The name of the `Trigger` to run.
|
1024
|
+
# Format: `projects/{project}/locations/{location}/triggers/{trigger}`
|
1031
1025
|
# @param project_id [::String]
|
1032
1026
|
# Required. ID of the project.
|
1033
1027
|
# @param trigger_id [::String]
|
@@ -1096,11 +1090,14 @@ module Google
|
|
1096
1090
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1097
1091
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1098
1092
|
#
|
1099
|
-
# @overload receive_trigger_webhook(body: nil, project_id: nil, trigger: nil, secret: nil)
|
1093
|
+
# @overload receive_trigger_webhook(name: nil, body: nil, project_id: nil, trigger: nil, secret: nil)
|
1100
1094
|
# Pass arguments to `receive_trigger_webhook` via keyword arguments. Note that at
|
1101
1095
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1102
1096
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1103
1097
|
#
|
1098
|
+
# @param name [::String]
|
1099
|
+
# The name of the `ReceiveTriggerWebhook` to retrieve.
|
1100
|
+
# Format: `projects/{project}/locations/{location}/triggers/{trigger}`
|
1104
1101
|
# @param body [::Google::Api::HttpBody, ::Hash]
|
1105
1102
|
# HTTP request body.
|
1106
1103
|
# @param project_id [::String]
|
@@ -1157,9 +1154,7 @@ module Google
|
|
1157
1154
|
end
|
1158
1155
|
|
1159
1156
|
##
|
1160
|
-
# Creates a `WorkerPool
|
1161
|
-
#
|
1162
|
-
# This API is experimental.
|
1157
|
+
# Creates a `WorkerPool`.
|
1163
1158
|
#
|
1164
1159
|
# @overload create_worker_pool(request, options = nil)
|
1165
1160
|
# Pass arguments to `create_worker_pool` via a request object, either of type
|
@@ -1171,21 +1166,31 @@ module Google
|
|
1171
1166
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1172
1167
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1173
1168
|
#
|
1174
|
-
# @overload create_worker_pool(parent: nil, worker_pool: nil)
|
1169
|
+
# @overload create_worker_pool(parent: nil, worker_pool: nil, worker_pool_id: nil, validate_only: nil)
|
1175
1170
|
# Pass arguments to `create_worker_pool` via keyword arguments. Note that at
|
1176
1171
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1177
1172
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1178
1173
|
#
|
1179
1174
|
# @param parent [::String]
|
1180
|
-
#
|
1175
|
+
# Required. The parent resource where this worker pool will be created.
|
1176
|
+
# Format: `projects/{project}/locations/{location}`.
|
1181
1177
|
# @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash]
|
1182
|
-
# `WorkerPool` resource to create.
|
1178
|
+
# Required. `WorkerPool` resource to create.
|
1179
|
+
# @param worker_pool_id [::String]
|
1180
|
+
# Required. Immutable. The ID to use for the `WorkerPool`, which will become
|
1181
|
+
# the final component of the resource name.
|
1182
|
+
#
|
1183
|
+
# This value should be 1-63 characters, and valid characters
|
1184
|
+
# are /[a-z][0-9]-/.
|
1185
|
+
# @param validate_only [::Boolean]
|
1186
|
+
# If set, validate the request and preview the response, but do not actually
|
1187
|
+
# post it.
|
1183
1188
|
#
|
1184
1189
|
# @yield [response, operation] Access the result along with the RPC operation
|
1185
|
-
# @yieldparam response [::
|
1190
|
+
# @yieldparam response [::Gapic::Operation]
|
1186
1191
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1187
1192
|
#
|
1188
|
-
# @return [::
|
1193
|
+
# @return [::Gapic::Operation]
|
1189
1194
|
#
|
1190
1195
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1191
1196
|
#
|
@@ -1206,6 +1211,12 @@ module Google
|
|
1206
1211
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1207
1212
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1208
1213
|
|
1214
|
+
header_params = {
|
1215
|
+
"parent" => request.parent
|
1216
|
+
}
|
1217
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1218
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1219
|
+
|
1209
1220
|
options.apply_defaults timeout: @config.rpcs.create_worker_pool.timeout,
|
1210
1221
|
metadata: metadata,
|
1211
1222
|
retry_policy: @config.rpcs.create_worker_pool.retry_policy
|
@@ -1213,6 +1224,7 @@ module Google
|
|
1213
1224
|
retry_policy: @config.retry_policy
|
1214
1225
|
|
1215
1226
|
@cloud_build_stub.call_rpc :create_worker_pool, request, options: options do |response, operation|
|
1227
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1216
1228
|
yield response, operation if block_given?
|
1217
1229
|
return response
|
1218
1230
|
end
|
@@ -1221,9 +1233,7 @@ module Google
|
|
1221
1233
|
end
|
1222
1234
|
|
1223
1235
|
##
|
1224
|
-
# Returns
|
1225
|
-
#
|
1226
|
-
# This API is experimental.
|
1236
|
+
# Returns details of a `WorkerPool`.
|
1227
1237
|
#
|
1228
1238
|
# @overload get_worker_pool(request, options = nil)
|
1229
1239
|
# Pass arguments to `get_worker_pool` via a request object, either of type
|
@@ -1241,8 +1251,8 @@ module Google
|
|
1241
1251
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1242
1252
|
#
|
1243
1253
|
# @param name [::String]
|
1244
|
-
# The
|
1245
|
-
#
|
1254
|
+
# Required. The name of the `WorkerPool` to retrieve.
|
1255
|
+
# Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
|
1246
1256
|
#
|
1247
1257
|
# @yield [response, operation] Access the result along with the RPC operation
|
1248
1258
|
# @yieldparam response [::Google::Cloud::Build::V1::WorkerPool]
|
@@ -1269,6 +1279,12 @@ module Google
|
|
1269
1279
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1270
1280
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1271
1281
|
|
1282
|
+
header_params = {
|
1283
|
+
"name" => request.name
|
1284
|
+
}
|
1285
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1286
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1287
|
+
|
1272
1288
|
options.apply_defaults timeout: @config.rpcs.get_worker_pool.timeout,
|
1273
1289
|
metadata: metadata,
|
1274
1290
|
retry_policy: @config.rpcs.get_worker_pool.retry_policy
|
@@ -1284,9 +1300,7 @@ module Google
|
|
1284
1300
|
end
|
1285
1301
|
|
1286
1302
|
##
|
1287
|
-
# Deletes a `WorkerPool
|
1288
|
-
#
|
1289
|
-
# This API is experimental.
|
1303
|
+
# Deletes a `WorkerPool`.
|
1290
1304
|
#
|
1291
1305
|
# @overload delete_worker_pool(request, options = nil)
|
1292
1306
|
# Pass arguments to `delete_worker_pool` via a request object, either of type
|
@@ -1298,20 +1312,30 @@ module Google
|
|
1298
1312
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1299
1313
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1300
1314
|
#
|
1301
|
-
# @overload delete_worker_pool(name: nil)
|
1315
|
+
# @overload delete_worker_pool(name: nil, etag: nil, allow_missing: nil, validate_only: nil)
|
1302
1316
|
# Pass arguments to `delete_worker_pool` via keyword arguments. Note that at
|
1303
1317
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1304
1318
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1305
1319
|
#
|
1306
1320
|
# @param name [::String]
|
1307
|
-
# The
|
1308
|
-
#
|
1321
|
+
# Required. The name of the `WorkerPool` to delete.
|
1322
|
+
# Format:
|
1323
|
+
# `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.
|
1324
|
+
# @param etag [::String]
|
1325
|
+
# Optional. If this is provided, it must match the server's etag on the
|
1326
|
+
# workerpool for the request to be processed.
|
1327
|
+
# @param allow_missing [::Boolean]
|
1328
|
+
# If set to true, and the `WorkerPool` is not found, the request will succeed
|
1329
|
+
# but no action will be taken on the server.
|
1330
|
+
# @param validate_only [::Boolean]
|
1331
|
+
# If set, validate the request and preview the response, but do not actually
|
1332
|
+
# post it.
|
1309
1333
|
#
|
1310
1334
|
# @yield [response, operation] Access the result along with the RPC operation
|
1311
|
-
# @yieldparam response [::
|
1335
|
+
# @yieldparam response [::Gapic::Operation]
|
1312
1336
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1313
1337
|
#
|
1314
|
-
# @return [::
|
1338
|
+
# @return [::Gapic::Operation]
|
1315
1339
|
#
|
1316
1340
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1317
1341
|
#
|
@@ -1332,6 +1356,12 @@ module Google
|
|
1332
1356
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1333
1357
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1334
1358
|
|
1359
|
+
header_params = {
|
1360
|
+
"name" => request.name
|
1361
|
+
}
|
1362
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1363
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1364
|
+
|
1335
1365
|
options.apply_defaults timeout: @config.rpcs.delete_worker_pool.timeout,
|
1336
1366
|
metadata: metadata,
|
1337
1367
|
retry_policy: @config.rpcs.delete_worker_pool.retry_policy
|
@@ -1339,6 +1369,7 @@ module Google
|
|
1339
1369
|
retry_policy: @config.retry_policy
|
1340
1370
|
|
1341
1371
|
@cloud_build_stub.call_rpc :delete_worker_pool, request, options: options do |response, operation|
|
1372
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1342
1373
|
yield response, operation if block_given?
|
1343
1374
|
return response
|
1344
1375
|
end
|
@@ -1347,9 +1378,7 @@ module Google
|
|
1347
1378
|
end
|
1348
1379
|
|
1349
1380
|
##
|
1350
|
-
#
|
1351
|
-
#
|
1352
|
-
# This API is experimental.
|
1381
|
+
# Updates a `WorkerPool`.
|
1353
1382
|
#
|
1354
1383
|
# @overload update_worker_pool(request, options = nil)
|
1355
1384
|
# Pass arguments to `update_worker_pool` via a request object, either of type
|
@@ -1361,22 +1390,27 @@ module Google
|
|
1361
1390
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1362
1391
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1363
1392
|
#
|
1364
|
-
# @overload update_worker_pool(
|
1393
|
+
# @overload update_worker_pool(worker_pool: nil, update_mask: nil, validate_only: nil)
|
1365
1394
|
# Pass arguments to `update_worker_pool` via keyword arguments. Note that at
|
1366
1395
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1367
1396
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1368
1397
|
#
|
1369
|
-
# @param name [::String]
|
1370
|
-
# The field will contain name of the resource requested, for example:
|
1371
|
-
# "projects/project-1/workerPools/workerpool-name"
|
1372
1398
|
# @param worker_pool [::Google::Cloud::Build::V1::WorkerPool, ::Hash]
|
1373
|
-
# `WorkerPool`
|
1399
|
+
# Required. The `WorkerPool` to update.
|
1400
|
+
#
|
1401
|
+
# The `name` field is used to identify the `WorkerPool` to update.
|
1402
|
+
# Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`.
|
1403
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1404
|
+
# A mask specifying which fields in `worker_pool` to update.
|
1405
|
+
# @param validate_only [::Boolean]
|
1406
|
+
# If set, validate the request and preview the response, but do not actually
|
1407
|
+
# post it.
|
1374
1408
|
#
|
1375
1409
|
# @yield [response, operation] Access the result along with the RPC operation
|
1376
|
-
# @yieldparam response [::
|
1410
|
+
# @yieldparam response [::Gapic::Operation]
|
1377
1411
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1378
1412
|
#
|
1379
|
-
# @return [::
|
1413
|
+
# @return [::Gapic::Operation]
|
1380
1414
|
#
|
1381
1415
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1382
1416
|
#
|
@@ -1397,6 +1431,12 @@ module Google
|
|
1397
1431
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1398
1432
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1399
1433
|
|
1434
|
+
header_params = {
|
1435
|
+
"worker_pool.name" => request.worker_pool.name
|
1436
|
+
}
|
1437
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1438
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1439
|
+
|
1400
1440
|
options.apply_defaults timeout: @config.rpcs.update_worker_pool.timeout,
|
1401
1441
|
metadata: metadata,
|
1402
1442
|
retry_policy: @config.rpcs.update_worker_pool.retry_policy
|
@@ -1404,6 +1444,7 @@ module Google
|
|
1404
1444
|
retry_policy: @config.retry_policy
|
1405
1445
|
|
1406
1446
|
@cloud_build_stub.call_rpc :update_worker_pool, request, options: options do |response, operation|
|
1447
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1407
1448
|
yield response, operation if block_given?
|
1408
1449
|
return response
|
1409
1450
|
end
|
@@ -1412,9 +1453,7 @@ module Google
|
|
1412
1453
|
end
|
1413
1454
|
|
1414
1455
|
##
|
1415
|
-
#
|
1416
|
-
#
|
1417
|
-
# This API is experimental.
|
1456
|
+
# Lists `WorkerPool`s.
|
1418
1457
|
#
|
1419
1458
|
# @overload list_worker_pools(request, options = nil)
|
1420
1459
|
# Pass arguments to `list_worker_pools` via a request object, either of type
|
@@ -1426,19 +1465,26 @@ module Google
|
|
1426
1465
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1427
1466
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1428
1467
|
#
|
1429
|
-
# @overload list_worker_pools(parent: nil)
|
1468
|
+
# @overload list_worker_pools(parent: nil, page_size: nil, page_token: nil)
|
1430
1469
|
# Pass arguments to `list_worker_pools` via keyword arguments. Note that at
|
1431
1470
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1432
1471
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
1433
1472
|
#
|
1434
1473
|
# @param parent [::String]
|
1435
|
-
#
|
1474
|
+
# Required. The parent of the collection of `WorkerPools`.
|
1475
|
+
# Format: `projects/{project}/locations/{location}`.
|
1476
|
+
# @param page_size [::Integer]
|
1477
|
+
# The maximum number of `WorkerPool`s to return. The service may return
|
1478
|
+
# fewer than this value. If omitted, the server will use a sensible default.
|
1479
|
+
# @param page_token [::String]
|
1480
|
+
# A page token, received from a previous `ListWorkerPools` call. Provide this
|
1481
|
+
# to retrieve the subsequent page.
|
1436
1482
|
#
|
1437
1483
|
# @yield [response, operation] Access the result along with the RPC operation
|
1438
|
-
# @yieldparam response [::Google::Cloud::Build::V1::
|
1484
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>]
|
1439
1485
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1440
1486
|
#
|
1441
|
-
# @return [::Google::Cloud::Build::V1::
|
1487
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Build::V1::WorkerPool>]
|
1442
1488
|
#
|
1443
1489
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1444
1490
|
#
|
@@ -1459,6 +1505,12 @@ module Google
|
|
1459
1505
|
gapic_version: ::Google::Cloud::Build::V1::VERSION
|
1460
1506
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1461
1507
|
|
1508
|
+
header_params = {
|
1509
|
+
"parent" => request.parent
|
1510
|
+
}
|
1511
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1512
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1513
|
+
|
1462
1514
|
options.apply_defaults timeout: @config.rpcs.list_worker_pools.timeout,
|
1463
1515
|
metadata: metadata,
|
1464
1516
|
retry_policy: @config.rpcs.list_worker_pools.retry_policy
|
@@ -1466,6 +1518,7 @@ module Google
|
|
1466
1518
|
retry_policy: @config.retry_policy
|
1467
1519
|
|
1468
1520
|
@cloud_build_stub.call_rpc :list_worker_pools, request, options: options do |response, operation|
|
1521
|
+
response = ::Gapic::PagedEnumerable.new @cloud_build_stub, :list_worker_pools, request, response, operation, options
|
1469
1522
|
yield response, operation if block_given?
|
1470
1523
|
return response
|
1471
1524
|
end
|