google-cloud-build-v1 0.12.0 → 0.14.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/AUTHENTICATION.md +1 -1
- data/README.md +2 -2
- data/lib/google/cloud/build/v1/cloud_build/client.rb +40 -46
- data/lib/google/cloud/build/v1/cloud_build/operations.rb +12 -14
- data/lib/google/cloud/build/v1/cloud_build/rest/client.rb +1773 -0
- data/lib/google/cloud/build/v1/cloud_build/rest/operations.rb +808 -0
- data/lib/google/cloud/build/v1/cloud_build/rest/service_stub.rb +1227 -0
- data/lib/google/cloud/build/v1/cloud_build/rest.rb +60 -0
- data/lib/google/cloud/build/v1/cloud_build.rb +7 -1
- data/lib/google/cloud/build/v1/rest.rb +37 -0
- data/lib/google/cloud/build/v1/version.rb +1 -1
- data/lib/google/cloud/build/v1.rb +7 -2
- data/lib/google/devtools/cloudbuild/v1/cloudbuild_pb.rb +32 -0
- data/proto_docs/google/api/client.rb +318 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/devtools/cloudbuild/v1/cloudbuild.rb +123 -0
- data/proto_docs/google/protobuf/empty.rb +0 -2
- data/proto_docs/google/rpc/status.rb +4 -2
- metadata +15 -8
@@ -0,0 +1,1227 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
require "google/devtools/cloudbuild/v1/cloudbuild_pb"
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Cloud
|
23
|
+
module Build
|
24
|
+
module V1
|
25
|
+
module CloudBuild
|
26
|
+
module Rest
|
27
|
+
##
|
28
|
+
# REST service stub for the CloudBuild service.
|
29
|
+
# Service stub contains baseline method implementations
|
30
|
+
# including transcoding, making the REST call, and deserialing the response.
|
31
|
+
#
|
32
|
+
class ServiceStub
|
33
|
+
def initialize endpoint:, credentials:
|
34
|
+
# These require statements are intentionally placed here to initialize
|
35
|
+
# the REST modules only when it's required.
|
36
|
+
require "gapic/rest"
|
37
|
+
|
38
|
+
@client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, credentials: credentials,
|
39
|
+
numeric_enums: true,
|
40
|
+
raise_faraday_errors: false
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# Baseline implementation for the create_build REST call
|
45
|
+
#
|
46
|
+
# @param request_pb [::Google::Cloud::Build::V1::CreateBuildRequest]
|
47
|
+
# A request object representing the call parameters. Required.
|
48
|
+
# @param options [::Gapic::CallOptions]
|
49
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
50
|
+
#
|
51
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
52
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
53
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
54
|
+
#
|
55
|
+
# @return [::Google::Longrunning::Operation]
|
56
|
+
# A result object deserialized from the server's reply
|
57
|
+
def create_build request_pb, options = nil
|
58
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
59
|
+
|
60
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_build_request request_pb
|
61
|
+
query_string_params = if query_string_params.any?
|
62
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
63
|
+
else
|
64
|
+
{}
|
65
|
+
end
|
66
|
+
|
67
|
+
response = @client_stub.make_http_request(
|
68
|
+
verb,
|
69
|
+
uri: uri,
|
70
|
+
body: body || "",
|
71
|
+
params: query_string_params,
|
72
|
+
options: options
|
73
|
+
)
|
74
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
75
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
76
|
+
|
77
|
+
yield result, operation if block_given?
|
78
|
+
result
|
79
|
+
end
|
80
|
+
|
81
|
+
##
|
82
|
+
# Baseline implementation for the get_build REST call
|
83
|
+
#
|
84
|
+
# @param request_pb [::Google::Cloud::Build::V1::GetBuildRequest]
|
85
|
+
# A request object representing the call parameters. Required.
|
86
|
+
# @param options [::Gapic::CallOptions]
|
87
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
88
|
+
#
|
89
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
90
|
+
# @yieldparam result [::Google::Cloud::Build::V1::Build]
|
91
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
92
|
+
#
|
93
|
+
# @return [::Google::Cloud::Build::V1::Build]
|
94
|
+
# A result object deserialized from the server's reply
|
95
|
+
def get_build request_pb, options = nil
|
96
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
97
|
+
|
98
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_build_request request_pb
|
99
|
+
query_string_params = if query_string_params.any?
|
100
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
101
|
+
else
|
102
|
+
{}
|
103
|
+
end
|
104
|
+
|
105
|
+
response = @client_stub.make_http_request(
|
106
|
+
verb,
|
107
|
+
uri: uri,
|
108
|
+
body: body || "",
|
109
|
+
params: query_string_params,
|
110
|
+
options: options
|
111
|
+
)
|
112
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
113
|
+
result = ::Google::Cloud::Build::V1::Build.decode_json response.body, ignore_unknown_fields: true
|
114
|
+
|
115
|
+
yield result, operation if block_given?
|
116
|
+
result
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Baseline implementation for the list_builds REST call
|
121
|
+
#
|
122
|
+
# @param request_pb [::Google::Cloud::Build::V1::ListBuildsRequest]
|
123
|
+
# A request object representing the call parameters. Required.
|
124
|
+
# @param options [::Gapic::CallOptions]
|
125
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
126
|
+
#
|
127
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
128
|
+
# @yieldparam result [::Google::Cloud::Build::V1::ListBuildsResponse]
|
129
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
130
|
+
#
|
131
|
+
# @return [::Google::Cloud::Build::V1::ListBuildsResponse]
|
132
|
+
# A result object deserialized from the server's reply
|
133
|
+
def list_builds request_pb, options = nil
|
134
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
135
|
+
|
136
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_builds_request request_pb
|
137
|
+
query_string_params = if query_string_params.any?
|
138
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
139
|
+
else
|
140
|
+
{}
|
141
|
+
end
|
142
|
+
|
143
|
+
response = @client_stub.make_http_request(
|
144
|
+
verb,
|
145
|
+
uri: uri,
|
146
|
+
body: body || "",
|
147
|
+
params: query_string_params,
|
148
|
+
options: options
|
149
|
+
)
|
150
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
151
|
+
result = ::Google::Cloud::Build::V1::ListBuildsResponse.decode_json response.body, ignore_unknown_fields: true
|
152
|
+
|
153
|
+
yield result, operation if block_given?
|
154
|
+
result
|
155
|
+
end
|
156
|
+
|
157
|
+
##
|
158
|
+
# Baseline implementation for the cancel_build REST call
|
159
|
+
#
|
160
|
+
# @param request_pb [::Google::Cloud::Build::V1::CancelBuildRequest]
|
161
|
+
# A request object representing the call parameters. Required.
|
162
|
+
# @param options [::Gapic::CallOptions]
|
163
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
164
|
+
#
|
165
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
166
|
+
# @yieldparam result [::Google::Cloud::Build::V1::Build]
|
167
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
168
|
+
#
|
169
|
+
# @return [::Google::Cloud::Build::V1::Build]
|
170
|
+
# A result object deserialized from the server's reply
|
171
|
+
def cancel_build request_pb, options = nil
|
172
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
173
|
+
|
174
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_cancel_build_request request_pb
|
175
|
+
query_string_params = if query_string_params.any?
|
176
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
177
|
+
else
|
178
|
+
{}
|
179
|
+
end
|
180
|
+
|
181
|
+
response = @client_stub.make_http_request(
|
182
|
+
verb,
|
183
|
+
uri: uri,
|
184
|
+
body: body || "",
|
185
|
+
params: query_string_params,
|
186
|
+
options: options
|
187
|
+
)
|
188
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
189
|
+
result = ::Google::Cloud::Build::V1::Build.decode_json response.body, ignore_unknown_fields: true
|
190
|
+
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
195
|
+
##
|
196
|
+
# Baseline implementation for the retry_build REST call
|
197
|
+
#
|
198
|
+
# @param request_pb [::Google::Cloud::Build::V1::RetryBuildRequest]
|
199
|
+
# A request object representing the call parameters. Required.
|
200
|
+
# @param options [::Gapic::CallOptions]
|
201
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
202
|
+
#
|
203
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
204
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
205
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
206
|
+
#
|
207
|
+
# @return [::Google::Longrunning::Operation]
|
208
|
+
# A result object deserialized from the server's reply
|
209
|
+
def retry_build request_pb, options = nil
|
210
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
211
|
+
|
212
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_retry_build_request request_pb
|
213
|
+
query_string_params = if query_string_params.any?
|
214
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
215
|
+
else
|
216
|
+
{}
|
217
|
+
end
|
218
|
+
|
219
|
+
response = @client_stub.make_http_request(
|
220
|
+
verb,
|
221
|
+
uri: uri,
|
222
|
+
body: body || "",
|
223
|
+
params: query_string_params,
|
224
|
+
options: options
|
225
|
+
)
|
226
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
227
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
228
|
+
|
229
|
+
yield result, operation if block_given?
|
230
|
+
result
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# Baseline implementation for the approve_build REST call
|
235
|
+
#
|
236
|
+
# @param request_pb [::Google::Cloud::Build::V1::ApproveBuildRequest]
|
237
|
+
# A request object representing the call parameters. Required.
|
238
|
+
# @param options [::Gapic::CallOptions]
|
239
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
240
|
+
#
|
241
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
242
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
243
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
244
|
+
#
|
245
|
+
# @return [::Google::Longrunning::Operation]
|
246
|
+
# A result object deserialized from the server's reply
|
247
|
+
def approve_build request_pb, options = nil
|
248
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
249
|
+
|
250
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_approve_build_request request_pb
|
251
|
+
query_string_params = if query_string_params.any?
|
252
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
253
|
+
else
|
254
|
+
{}
|
255
|
+
end
|
256
|
+
|
257
|
+
response = @client_stub.make_http_request(
|
258
|
+
verb,
|
259
|
+
uri: uri,
|
260
|
+
body: body || "",
|
261
|
+
params: query_string_params,
|
262
|
+
options: options
|
263
|
+
)
|
264
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
265
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
266
|
+
|
267
|
+
yield result, operation if block_given?
|
268
|
+
result
|
269
|
+
end
|
270
|
+
|
271
|
+
##
|
272
|
+
# Baseline implementation for the create_build_trigger REST call
|
273
|
+
#
|
274
|
+
# @param request_pb [::Google::Cloud::Build::V1::CreateBuildTriggerRequest]
|
275
|
+
# A request object representing the call parameters. Required.
|
276
|
+
# @param options [::Gapic::CallOptions]
|
277
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
278
|
+
#
|
279
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
280
|
+
# @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger]
|
281
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
282
|
+
#
|
283
|
+
# @return [::Google::Cloud::Build::V1::BuildTrigger]
|
284
|
+
# A result object deserialized from the server's reply
|
285
|
+
def create_build_trigger request_pb, options = nil
|
286
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
287
|
+
|
288
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_build_trigger_request request_pb
|
289
|
+
query_string_params = if query_string_params.any?
|
290
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
291
|
+
else
|
292
|
+
{}
|
293
|
+
end
|
294
|
+
|
295
|
+
response = @client_stub.make_http_request(
|
296
|
+
verb,
|
297
|
+
uri: uri,
|
298
|
+
body: body || "",
|
299
|
+
params: query_string_params,
|
300
|
+
options: options
|
301
|
+
)
|
302
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
303
|
+
result = ::Google::Cloud::Build::V1::BuildTrigger.decode_json response.body, ignore_unknown_fields: true
|
304
|
+
|
305
|
+
yield result, operation if block_given?
|
306
|
+
result
|
307
|
+
end
|
308
|
+
|
309
|
+
##
|
310
|
+
# Baseline implementation for the get_build_trigger REST call
|
311
|
+
#
|
312
|
+
# @param request_pb [::Google::Cloud::Build::V1::GetBuildTriggerRequest]
|
313
|
+
# A request object representing the call parameters. Required.
|
314
|
+
# @param options [::Gapic::CallOptions]
|
315
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
316
|
+
#
|
317
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
318
|
+
# @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger]
|
319
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
320
|
+
#
|
321
|
+
# @return [::Google::Cloud::Build::V1::BuildTrigger]
|
322
|
+
# A result object deserialized from the server's reply
|
323
|
+
def get_build_trigger request_pb, options = nil
|
324
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
325
|
+
|
326
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_build_trigger_request request_pb
|
327
|
+
query_string_params = if query_string_params.any?
|
328
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
329
|
+
else
|
330
|
+
{}
|
331
|
+
end
|
332
|
+
|
333
|
+
response = @client_stub.make_http_request(
|
334
|
+
verb,
|
335
|
+
uri: uri,
|
336
|
+
body: body || "",
|
337
|
+
params: query_string_params,
|
338
|
+
options: options
|
339
|
+
)
|
340
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
341
|
+
result = ::Google::Cloud::Build::V1::BuildTrigger.decode_json response.body, ignore_unknown_fields: true
|
342
|
+
|
343
|
+
yield result, operation if block_given?
|
344
|
+
result
|
345
|
+
end
|
346
|
+
|
347
|
+
##
|
348
|
+
# Baseline implementation for the list_build_triggers REST call
|
349
|
+
#
|
350
|
+
# @param request_pb [::Google::Cloud::Build::V1::ListBuildTriggersRequest]
|
351
|
+
# A request object representing the call parameters. Required.
|
352
|
+
# @param options [::Gapic::CallOptions]
|
353
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
354
|
+
#
|
355
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
356
|
+
# @yieldparam result [::Google::Cloud::Build::V1::ListBuildTriggersResponse]
|
357
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
358
|
+
#
|
359
|
+
# @return [::Google::Cloud::Build::V1::ListBuildTriggersResponse]
|
360
|
+
# A result object deserialized from the server's reply
|
361
|
+
def list_build_triggers request_pb, options = nil
|
362
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
363
|
+
|
364
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_build_triggers_request request_pb
|
365
|
+
query_string_params = if query_string_params.any?
|
366
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
367
|
+
else
|
368
|
+
{}
|
369
|
+
end
|
370
|
+
|
371
|
+
response = @client_stub.make_http_request(
|
372
|
+
verb,
|
373
|
+
uri: uri,
|
374
|
+
body: body || "",
|
375
|
+
params: query_string_params,
|
376
|
+
options: options
|
377
|
+
)
|
378
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
379
|
+
result = ::Google::Cloud::Build::V1::ListBuildTriggersResponse.decode_json response.body, ignore_unknown_fields: true
|
380
|
+
|
381
|
+
yield result, operation if block_given?
|
382
|
+
result
|
383
|
+
end
|
384
|
+
|
385
|
+
##
|
386
|
+
# Baseline implementation for the delete_build_trigger REST call
|
387
|
+
#
|
388
|
+
# @param request_pb [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest]
|
389
|
+
# A request object representing the call parameters. Required.
|
390
|
+
# @param options [::Gapic::CallOptions]
|
391
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
392
|
+
#
|
393
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
394
|
+
# @yieldparam result [::Google::Protobuf::Empty]
|
395
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
396
|
+
#
|
397
|
+
# @return [::Google::Protobuf::Empty]
|
398
|
+
# A result object deserialized from the server's reply
|
399
|
+
def delete_build_trigger request_pb, options = nil
|
400
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
401
|
+
|
402
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_build_trigger_request request_pb
|
403
|
+
query_string_params = if query_string_params.any?
|
404
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
405
|
+
else
|
406
|
+
{}
|
407
|
+
end
|
408
|
+
|
409
|
+
response = @client_stub.make_http_request(
|
410
|
+
verb,
|
411
|
+
uri: uri,
|
412
|
+
body: body || "",
|
413
|
+
params: query_string_params,
|
414
|
+
options: options
|
415
|
+
)
|
416
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
417
|
+
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
418
|
+
|
419
|
+
yield result, operation if block_given?
|
420
|
+
result
|
421
|
+
end
|
422
|
+
|
423
|
+
##
|
424
|
+
# Baseline implementation for the update_build_trigger REST call
|
425
|
+
#
|
426
|
+
# @param request_pb [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest]
|
427
|
+
# A request object representing the call parameters. Required.
|
428
|
+
# @param options [::Gapic::CallOptions]
|
429
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
430
|
+
#
|
431
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
432
|
+
# @yieldparam result [::Google::Cloud::Build::V1::BuildTrigger]
|
433
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
434
|
+
#
|
435
|
+
# @return [::Google::Cloud::Build::V1::BuildTrigger]
|
436
|
+
# A result object deserialized from the server's reply
|
437
|
+
def update_build_trigger request_pb, options = nil
|
438
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
439
|
+
|
440
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_build_trigger_request request_pb
|
441
|
+
query_string_params = if query_string_params.any?
|
442
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
443
|
+
else
|
444
|
+
{}
|
445
|
+
end
|
446
|
+
|
447
|
+
response = @client_stub.make_http_request(
|
448
|
+
verb,
|
449
|
+
uri: uri,
|
450
|
+
body: body || "",
|
451
|
+
params: query_string_params,
|
452
|
+
options: options
|
453
|
+
)
|
454
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
455
|
+
result = ::Google::Cloud::Build::V1::BuildTrigger.decode_json response.body, ignore_unknown_fields: true
|
456
|
+
|
457
|
+
yield result, operation if block_given?
|
458
|
+
result
|
459
|
+
end
|
460
|
+
|
461
|
+
##
|
462
|
+
# Baseline implementation for the run_build_trigger REST call
|
463
|
+
#
|
464
|
+
# @param request_pb [::Google::Cloud::Build::V1::RunBuildTriggerRequest]
|
465
|
+
# A request object representing the call parameters. Required.
|
466
|
+
# @param options [::Gapic::CallOptions]
|
467
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
468
|
+
#
|
469
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
470
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
471
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
472
|
+
#
|
473
|
+
# @return [::Google::Longrunning::Operation]
|
474
|
+
# A result object deserialized from the server's reply
|
475
|
+
def run_build_trigger request_pb, options = nil
|
476
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
477
|
+
|
478
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_run_build_trigger_request request_pb
|
479
|
+
query_string_params = if query_string_params.any?
|
480
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
481
|
+
else
|
482
|
+
{}
|
483
|
+
end
|
484
|
+
|
485
|
+
response = @client_stub.make_http_request(
|
486
|
+
verb,
|
487
|
+
uri: uri,
|
488
|
+
body: body || "",
|
489
|
+
params: query_string_params,
|
490
|
+
options: options
|
491
|
+
)
|
492
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
493
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
494
|
+
|
495
|
+
yield result, operation if block_given?
|
496
|
+
result
|
497
|
+
end
|
498
|
+
|
499
|
+
##
|
500
|
+
# Baseline implementation for the receive_trigger_webhook REST call
|
501
|
+
#
|
502
|
+
# @param request_pb [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest]
|
503
|
+
# A request object representing the call parameters. Required.
|
504
|
+
# @param options [::Gapic::CallOptions]
|
505
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
506
|
+
#
|
507
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
508
|
+
# @yieldparam result [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse]
|
509
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
510
|
+
#
|
511
|
+
# @return [::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse]
|
512
|
+
# A result object deserialized from the server's reply
|
513
|
+
def receive_trigger_webhook request_pb, options = nil
|
514
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
515
|
+
|
516
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_receive_trigger_webhook_request request_pb
|
517
|
+
query_string_params = if query_string_params.any?
|
518
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
519
|
+
else
|
520
|
+
{}
|
521
|
+
end
|
522
|
+
|
523
|
+
response = @client_stub.make_http_request(
|
524
|
+
verb,
|
525
|
+
uri: uri,
|
526
|
+
body: body || "",
|
527
|
+
params: query_string_params,
|
528
|
+
options: options
|
529
|
+
)
|
530
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
531
|
+
result = ::Google::Cloud::Build::V1::ReceiveTriggerWebhookResponse.decode_json response.body, ignore_unknown_fields: true
|
532
|
+
|
533
|
+
yield result, operation if block_given?
|
534
|
+
result
|
535
|
+
end
|
536
|
+
|
537
|
+
##
|
538
|
+
# Baseline implementation for the create_worker_pool REST call
|
539
|
+
#
|
540
|
+
# @param request_pb [::Google::Cloud::Build::V1::CreateWorkerPoolRequest]
|
541
|
+
# A request object representing the call parameters. Required.
|
542
|
+
# @param options [::Gapic::CallOptions]
|
543
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
544
|
+
#
|
545
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
546
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
547
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
548
|
+
#
|
549
|
+
# @return [::Google::Longrunning::Operation]
|
550
|
+
# A result object deserialized from the server's reply
|
551
|
+
def create_worker_pool request_pb, options = nil
|
552
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
553
|
+
|
554
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_worker_pool_request request_pb
|
555
|
+
query_string_params = if query_string_params.any?
|
556
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
557
|
+
else
|
558
|
+
{}
|
559
|
+
end
|
560
|
+
|
561
|
+
response = @client_stub.make_http_request(
|
562
|
+
verb,
|
563
|
+
uri: uri,
|
564
|
+
body: body || "",
|
565
|
+
params: query_string_params,
|
566
|
+
options: options
|
567
|
+
)
|
568
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
569
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
570
|
+
|
571
|
+
yield result, operation if block_given?
|
572
|
+
result
|
573
|
+
end
|
574
|
+
|
575
|
+
##
|
576
|
+
# Baseline implementation for the get_worker_pool REST call
|
577
|
+
#
|
578
|
+
# @param request_pb [::Google::Cloud::Build::V1::GetWorkerPoolRequest]
|
579
|
+
# A request object representing the call parameters. Required.
|
580
|
+
# @param options [::Gapic::CallOptions]
|
581
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
582
|
+
#
|
583
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
584
|
+
# @yieldparam result [::Google::Cloud::Build::V1::WorkerPool]
|
585
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
586
|
+
#
|
587
|
+
# @return [::Google::Cloud::Build::V1::WorkerPool]
|
588
|
+
# A result object deserialized from the server's reply
|
589
|
+
def get_worker_pool request_pb, options = nil
|
590
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
591
|
+
|
592
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_get_worker_pool_request request_pb
|
593
|
+
query_string_params = if query_string_params.any?
|
594
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
595
|
+
else
|
596
|
+
{}
|
597
|
+
end
|
598
|
+
|
599
|
+
response = @client_stub.make_http_request(
|
600
|
+
verb,
|
601
|
+
uri: uri,
|
602
|
+
body: body || "",
|
603
|
+
params: query_string_params,
|
604
|
+
options: options
|
605
|
+
)
|
606
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
607
|
+
result = ::Google::Cloud::Build::V1::WorkerPool.decode_json response.body, ignore_unknown_fields: true
|
608
|
+
|
609
|
+
yield result, operation if block_given?
|
610
|
+
result
|
611
|
+
end
|
612
|
+
|
613
|
+
##
|
614
|
+
# Baseline implementation for the delete_worker_pool REST call
|
615
|
+
#
|
616
|
+
# @param request_pb [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest]
|
617
|
+
# A request object representing the call parameters. Required.
|
618
|
+
# @param options [::Gapic::CallOptions]
|
619
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
620
|
+
#
|
621
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
622
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
623
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
624
|
+
#
|
625
|
+
# @return [::Google::Longrunning::Operation]
|
626
|
+
# A result object deserialized from the server's reply
|
627
|
+
def delete_worker_pool request_pb, options = nil
|
628
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
629
|
+
|
630
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_worker_pool_request request_pb
|
631
|
+
query_string_params = if query_string_params.any?
|
632
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
633
|
+
else
|
634
|
+
{}
|
635
|
+
end
|
636
|
+
|
637
|
+
response = @client_stub.make_http_request(
|
638
|
+
verb,
|
639
|
+
uri: uri,
|
640
|
+
body: body || "",
|
641
|
+
params: query_string_params,
|
642
|
+
options: options
|
643
|
+
)
|
644
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
645
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
646
|
+
|
647
|
+
yield result, operation if block_given?
|
648
|
+
result
|
649
|
+
end
|
650
|
+
|
651
|
+
##
|
652
|
+
# Baseline implementation for the update_worker_pool REST call
|
653
|
+
#
|
654
|
+
# @param request_pb [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest]
|
655
|
+
# A request object representing the call parameters. Required.
|
656
|
+
# @param options [::Gapic::CallOptions]
|
657
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
658
|
+
#
|
659
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
660
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
661
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
662
|
+
#
|
663
|
+
# @return [::Google::Longrunning::Operation]
|
664
|
+
# A result object deserialized from the server's reply
|
665
|
+
def update_worker_pool request_pb, options = nil
|
666
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
667
|
+
|
668
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_update_worker_pool_request request_pb
|
669
|
+
query_string_params = if query_string_params.any?
|
670
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
671
|
+
else
|
672
|
+
{}
|
673
|
+
end
|
674
|
+
|
675
|
+
response = @client_stub.make_http_request(
|
676
|
+
verb,
|
677
|
+
uri: uri,
|
678
|
+
body: body || "",
|
679
|
+
params: query_string_params,
|
680
|
+
options: options
|
681
|
+
)
|
682
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
683
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
684
|
+
|
685
|
+
yield result, operation if block_given?
|
686
|
+
result
|
687
|
+
end
|
688
|
+
|
689
|
+
##
|
690
|
+
# Baseline implementation for the list_worker_pools REST call
|
691
|
+
#
|
692
|
+
# @param request_pb [::Google::Cloud::Build::V1::ListWorkerPoolsRequest]
|
693
|
+
# A request object representing the call parameters. Required.
|
694
|
+
# @param options [::Gapic::CallOptions]
|
695
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
696
|
+
#
|
697
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
698
|
+
# @yieldparam result [::Google::Cloud::Build::V1::ListWorkerPoolsResponse]
|
699
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
700
|
+
#
|
701
|
+
# @return [::Google::Cloud::Build::V1::ListWorkerPoolsResponse]
|
702
|
+
# A result object deserialized from the server's reply
|
703
|
+
def list_worker_pools request_pb, options = nil
|
704
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
705
|
+
|
706
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_list_worker_pools_request request_pb
|
707
|
+
query_string_params = if query_string_params.any?
|
708
|
+
query_string_params.to_h { |p| p.split("=", 2) }
|
709
|
+
else
|
710
|
+
{}
|
711
|
+
end
|
712
|
+
|
713
|
+
response = @client_stub.make_http_request(
|
714
|
+
verb,
|
715
|
+
uri: uri,
|
716
|
+
body: body || "",
|
717
|
+
params: query_string_params,
|
718
|
+
options: options
|
719
|
+
)
|
720
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
721
|
+
result = ::Google::Cloud::Build::V1::ListWorkerPoolsResponse.decode_json response.body, ignore_unknown_fields: true
|
722
|
+
|
723
|
+
yield result, operation if block_given?
|
724
|
+
result
|
725
|
+
end
|
726
|
+
|
727
|
+
##
|
728
|
+
# @private
|
729
|
+
#
|
730
|
+
# GRPC transcoding helper method for the create_build REST call
|
731
|
+
#
|
732
|
+
# @param request_pb [::Google::Cloud::Build::V1::CreateBuildRequest]
|
733
|
+
# A request object representing the call parameters. Required.
|
734
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
735
|
+
# Uri, Body, Query string parameters
|
736
|
+
def self.transcode_create_build_request request_pb
|
737
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
738
|
+
.with_bindings(
|
739
|
+
uri_method: :post,
|
740
|
+
uri_template: "/v1/projects/{project_id}/builds",
|
741
|
+
body: "build",
|
742
|
+
matches: [
|
743
|
+
["project_id", %r{^[^/]+/?$}, false]
|
744
|
+
]
|
745
|
+
)
|
746
|
+
.with_bindings(
|
747
|
+
uri_method: :post,
|
748
|
+
uri_template: "/v1/{parent}/builds",
|
749
|
+
body: "build",
|
750
|
+
matches: [
|
751
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
752
|
+
]
|
753
|
+
)
|
754
|
+
transcoder.transcode request_pb
|
755
|
+
end
|
756
|
+
|
757
|
+
##
|
758
|
+
# @private
|
759
|
+
#
|
760
|
+
# GRPC transcoding helper method for the get_build REST call
|
761
|
+
#
|
762
|
+
# @param request_pb [::Google::Cloud::Build::V1::GetBuildRequest]
|
763
|
+
# A request object representing the call parameters. Required.
|
764
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
765
|
+
# Uri, Body, Query string parameters
|
766
|
+
def self.transcode_get_build_request request_pb
|
767
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
768
|
+
.with_bindings(
|
769
|
+
uri_method: :get,
|
770
|
+
uri_template: "/v1/projects/{project_id}/builds/{id}",
|
771
|
+
matches: [
|
772
|
+
["project_id", %r{^[^/]+/?$}, false],
|
773
|
+
["id", %r{^[^/]+/?$}, false]
|
774
|
+
]
|
775
|
+
)
|
776
|
+
.with_bindings(
|
777
|
+
uri_method: :get,
|
778
|
+
uri_template: "/v1/{name}",
|
779
|
+
matches: [
|
780
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false]
|
781
|
+
]
|
782
|
+
)
|
783
|
+
transcoder.transcode request_pb
|
784
|
+
end
|
785
|
+
|
786
|
+
##
|
787
|
+
# @private
|
788
|
+
#
|
789
|
+
# GRPC transcoding helper method for the list_builds REST call
|
790
|
+
#
|
791
|
+
# @param request_pb [::Google::Cloud::Build::V1::ListBuildsRequest]
|
792
|
+
# A request object representing the call parameters. Required.
|
793
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
794
|
+
# Uri, Body, Query string parameters
|
795
|
+
def self.transcode_list_builds_request request_pb
|
796
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
797
|
+
.with_bindings(
|
798
|
+
uri_method: :get,
|
799
|
+
uri_template: "/v1/projects/{project_id}/builds",
|
800
|
+
matches: [
|
801
|
+
["project_id", %r{^[^/]+/?$}, false]
|
802
|
+
]
|
803
|
+
)
|
804
|
+
.with_bindings(
|
805
|
+
uri_method: :get,
|
806
|
+
uri_template: "/v1/{parent}/builds",
|
807
|
+
matches: [
|
808
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
809
|
+
]
|
810
|
+
)
|
811
|
+
transcoder.transcode request_pb
|
812
|
+
end
|
813
|
+
|
814
|
+
##
|
815
|
+
# @private
|
816
|
+
#
|
817
|
+
# GRPC transcoding helper method for the cancel_build REST call
|
818
|
+
#
|
819
|
+
# @param request_pb [::Google::Cloud::Build::V1::CancelBuildRequest]
|
820
|
+
# A request object representing the call parameters. Required.
|
821
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
822
|
+
# Uri, Body, Query string parameters
|
823
|
+
def self.transcode_cancel_build_request request_pb
|
824
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
825
|
+
.with_bindings(
|
826
|
+
uri_method: :post,
|
827
|
+
uri_template: "/v1/projects/{project_id}/builds/{id}:cancel",
|
828
|
+
body: "*",
|
829
|
+
matches: [
|
830
|
+
["project_id", %r{^[^/]+/?$}, false],
|
831
|
+
["id", %r{^[^/]+/?$}, false]
|
832
|
+
]
|
833
|
+
)
|
834
|
+
.with_bindings(
|
835
|
+
uri_method: :post,
|
836
|
+
uri_template: "/v1/{name}:cancel",
|
837
|
+
body: "*",
|
838
|
+
matches: [
|
839
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false]
|
840
|
+
]
|
841
|
+
)
|
842
|
+
transcoder.transcode request_pb
|
843
|
+
end
|
844
|
+
|
845
|
+
##
|
846
|
+
# @private
|
847
|
+
#
|
848
|
+
# GRPC transcoding helper method for the retry_build REST call
|
849
|
+
#
|
850
|
+
# @param request_pb [::Google::Cloud::Build::V1::RetryBuildRequest]
|
851
|
+
# A request object representing the call parameters. Required.
|
852
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
853
|
+
# Uri, Body, Query string parameters
|
854
|
+
def self.transcode_retry_build_request request_pb
|
855
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
856
|
+
.with_bindings(
|
857
|
+
uri_method: :post,
|
858
|
+
uri_template: "/v1/projects/{project_id}/builds/{id}:retry",
|
859
|
+
body: "*",
|
860
|
+
matches: [
|
861
|
+
["project_id", %r{^[^/]+/?$}, false],
|
862
|
+
["id", %r{^[^/]+/?$}, false]
|
863
|
+
]
|
864
|
+
)
|
865
|
+
.with_bindings(
|
866
|
+
uri_method: :post,
|
867
|
+
uri_template: "/v1/{name}:retry",
|
868
|
+
body: "*",
|
869
|
+
matches: [
|
870
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false]
|
871
|
+
]
|
872
|
+
)
|
873
|
+
transcoder.transcode request_pb
|
874
|
+
end
|
875
|
+
|
876
|
+
##
|
877
|
+
# @private
|
878
|
+
#
|
879
|
+
# GRPC transcoding helper method for the approve_build REST call
|
880
|
+
#
|
881
|
+
# @param request_pb [::Google::Cloud::Build::V1::ApproveBuildRequest]
|
882
|
+
# A request object representing the call parameters. Required.
|
883
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
884
|
+
# Uri, Body, Query string parameters
|
885
|
+
def self.transcode_approve_build_request request_pb
|
886
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
887
|
+
.with_bindings(
|
888
|
+
uri_method: :post,
|
889
|
+
uri_template: "/v1/{name}:approve",
|
890
|
+
body: "*",
|
891
|
+
matches: [
|
892
|
+
["name", %r{^projects/[^/]+/builds/[^/]+/?$}, false]
|
893
|
+
]
|
894
|
+
)
|
895
|
+
.with_bindings(
|
896
|
+
uri_method: :post,
|
897
|
+
uri_template: "/v1/{name}:approve",
|
898
|
+
body: "*",
|
899
|
+
matches: [
|
900
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/builds/[^/]+/?$}, false]
|
901
|
+
]
|
902
|
+
)
|
903
|
+
transcoder.transcode request_pb
|
904
|
+
end
|
905
|
+
|
906
|
+
##
|
907
|
+
# @private
|
908
|
+
#
|
909
|
+
# GRPC transcoding helper method for the create_build_trigger REST call
|
910
|
+
#
|
911
|
+
# @param request_pb [::Google::Cloud::Build::V1::CreateBuildTriggerRequest]
|
912
|
+
# A request object representing the call parameters. Required.
|
913
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
914
|
+
# Uri, Body, Query string parameters
|
915
|
+
def self.transcode_create_build_trigger_request request_pb
|
916
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
917
|
+
.with_bindings(
|
918
|
+
uri_method: :post,
|
919
|
+
uri_template: "/v1/projects/{project_id}/triggers",
|
920
|
+
body: "trigger",
|
921
|
+
matches: [
|
922
|
+
["project_id", %r{^[^/]+/?$}, false]
|
923
|
+
]
|
924
|
+
)
|
925
|
+
.with_bindings(
|
926
|
+
uri_method: :post,
|
927
|
+
uri_template: "/v1/{parent}/triggers",
|
928
|
+
body: "trigger",
|
929
|
+
matches: [
|
930
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
931
|
+
]
|
932
|
+
)
|
933
|
+
transcoder.transcode request_pb
|
934
|
+
end
|
935
|
+
|
936
|
+
##
|
937
|
+
# @private
|
938
|
+
#
|
939
|
+
# GRPC transcoding helper method for the get_build_trigger REST call
|
940
|
+
#
|
941
|
+
# @param request_pb [::Google::Cloud::Build::V1::GetBuildTriggerRequest]
|
942
|
+
# A request object representing the call parameters. Required.
|
943
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
944
|
+
# Uri, Body, Query string parameters
|
945
|
+
def self.transcode_get_build_trigger_request request_pb
|
946
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
947
|
+
.with_bindings(
|
948
|
+
uri_method: :get,
|
949
|
+
uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}",
|
950
|
+
matches: [
|
951
|
+
["project_id", %r{^[^/]+/?$}, false],
|
952
|
+
["trigger_id", %r{^[^/]+/?$}, false]
|
953
|
+
]
|
954
|
+
)
|
955
|
+
.with_bindings(
|
956
|
+
uri_method: :get,
|
957
|
+
uri_template: "/v1/{name}",
|
958
|
+
matches: [
|
959
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
|
960
|
+
]
|
961
|
+
)
|
962
|
+
transcoder.transcode request_pb
|
963
|
+
end
|
964
|
+
|
965
|
+
##
|
966
|
+
# @private
|
967
|
+
#
|
968
|
+
# GRPC transcoding helper method for the list_build_triggers REST call
|
969
|
+
#
|
970
|
+
# @param request_pb [::Google::Cloud::Build::V1::ListBuildTriggersRequest]
|
971
|
+
# A request object representing the call parameters. Required.
|
972
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
973
|
+
# Uri, Body, Query string parameters
|
974
|
+
def self.transcode_list_build_triggers_request request_pb
|
975
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
976
|
+
.with_bindings(
|
977
|
+
uri_method: :get,
|
978
|
+
uri_template: "/v1/projects/{project_id}/triggers",
|
979
|
+
matches: [
|
980
|
+
["project_id", %r{^[^/]+/?$}, false]
|
981
|
+
]
|
982
|
+
)
|
983
|
+
.with_bindings(
|
984
|
+
uri_method: :get,
|
985
|
+
uri_template: "/v1/{parent}/triggers",
|
986
|
+
matches: [
|
987
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
988
|
+
]
|
989
|
+
)
|
990
|
+
transcoder.transcode request_pb
|
991
|
+
end
|
992
|
+
|
993
|
+
##
|
994
|
+
# @private
|
995
|
+
#
|
996
|
+
# GRPC transcoding helper method for the delete_build_trigger REST call
|
997
|
+
#
|
998
|
+
# @param request_pb [::Google::Cloud::Build::V1::DeleteBuildTriggerRequest]
|
999
|
+
# A request object representing the call parameters. Required.
|
1000
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1001
|
+
# Uri, Body, Query string parameters
|
1002
|
+
def self.transcode_delete_build_trigger_request request_pb
|
1003
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1004
|
+
.with_bindings(
|
1005
|
+
uri_method: :delete,
|
1006
|
+
uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}",
|
1007
|
+
matches: [
|
1008
|
+
["project_id", %r{^[^/]+/?$}, false],
|
1009
|
+
["trigger_id", %r{^[^/]+/?$}, false]
|
1010
|
+
]
|
1011
|
+
)
|
1012
|
+
.with_bindings(
|
1013
|
+
uri_method: :delete,
|
1014
|
+
uri_template: "/v1/{name}",
|
1015
|
+
matches: [
|
1016
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
|
1017
|
+
]
|
1018
|
+
)
|
1019
|
+
transcoder.transcode request_pb
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
##
|
1023
|
+
# @private
|
1024
|
+
#
|
1025
|
+
# GRPC transcoding helper method for the update_build_trigger REST call
|
1026
|
+
#
|
1027
|
+
# @param request_pb [::Google::Cloud::Build::V1::UpdateBuildTriggerRequest]
|
1028
|
+
# A request object representing the call parameters. Required.
|
1029
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1030
|
+
# Uri, Body, Query string parameters
|
1031
|
+
def self.transcode_update_build_trigger_request request_pb
|
1032
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1033
|
+
.with_bindings(
|
1034
|
+
uri_method: :patch,
|
1035
|
+
uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}",
|
1036
|
+
body: "trigger",
|
1037
|
+
matches: [
|
1038
|
+
["project_id", %r{^[^/]+/?$}, false],
|
1039
|
+
["trigger_id", %r{^[^/]+/?$}, false]
|
1040
|
+
]
|
1041
|
+
)
|
1042
|
+
.with_bindings(
|
1043
|
+
uri_method: :patch,
|
1044
|
+
uri_template: "/v1/{trigger.resource_name}",
|
1045
|
+
body: "trigger",
|
1046
|
+
matches: [
|
1047
|
+
["trigger.resource_name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
|
1048
|
+
]
|
1049
|
+
)
|
1050
|
+
transcoder.transcode request_pb
|
1051
|
+
end
|
1052
|
+
|
1053
|
+
##
|
1054
|
+
# @private
|
1055
|
+
#
|
1056
|
+
# GRPC transcoding helper method for the run_build_trigger REST call
|
1057
|
+
#
|
1058
|
+
# @param request_pb [::Google::Cloud::Build::V1::RunBuildTriggerRequest]
|
1059
|
+
# A request object representing the call parameters. Required.
|
1060
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1061
|
+
# Uri, Body, Query string parameters
|
1062
|
+
def self.transcode_run_build_trigger_request request_pb
|
1063
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1064
|
+
.with_bindings(
|
1065
|
+
uri_method: :post,
|
1066
|
+
uri_template: "/v1/projects/{project_id}/triggers/{trigger_id}:run",
|
1067
|
+
body: "source",
|
1068
|
+
matches: [
|
1069
|
+
["project_id", %r{^[^/]+/?$}, false],
|
1070
|
+
["trigger_id", %r{^[^/]+/?$}, false]
|
1071
|
+
]
|
1072
|
+
)
|
1073
|
+
.with_bindings(
|
1074
|
+
uri_method: :post,
|
1075
|
+
uri_template: "/v1/{name}:run",
|
1076
|
+
body: "*",
|
1077
|
+
matches: [
|
1078
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
|
1079
|
+
]
|
1080
|
+
)
|
1081
|
+
transcoder.transcode request_pb
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
##
|
1085
|
+
# @private
|
1086
|
+
#
|
1087
|
+
# GRPC transcoding helper method for the receive_trigger_webhook REST call
|
1088
|
+
#
|
1089
|
+
# @param request_pb [::Google::Cloud::Build::V1::ReceiveTriggerWebhookRequest]
|
1090
|
+
# A request object representing the call parameters. Required.
|
1091
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1092
|
+
# Uri, Body, Query string parameters
|
1093
|
+
def self.transcode_receive_trigger_webhook_request request_pb
|
1094
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1095
|
+
.with_bindings(
|
1096
|
+
uri_method: :post,
|
1097
|
+
uri_template: "/v1/projects/{project_id}/triggers/{trigger}:webhook",
|
1098
|
+
body: "body",
|
1099
|
+
matches: [
|
1100
|
+
["project_id", %r{^[^/]+/?$}, false],
|
1101
|
+
["trigger", %r{^[^/]+/?$}, false]
|
1102
|
+
]
|
1103
|
+
)
|
1104
|
+
.with_bindings(
|
1105
|
+
uri_method: :post,
|
1106
|
+
uri_template: "/v1/{name}:webhook",
|
1107
|
+
body: "body",
|
1108
|
+
matches: [
|
1109
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false]
|
1110
|
+
]
|
1111
|
+
)
|
1112
|
+
transcoder.transcode request_pb
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
##
|
1116
|
+
# @private
|
1117
|
+
#
|
1118
|
+
# GRPC transcoding helper method for the create_worker_pool REST call
|
1119
|
+
#
|
1120
|
+
# @param request_pb [::Google::Cloud::Build::V1::CreateWorkerPoolRequest]
|
1121
|
+
# A request object representing the call parameters. Required.
|
1122
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1123
|
+
# Uri, Body, Query string parameters
|
1124
|
+
def self.transcode_create_worker_pool_request request_pb
|
1125
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1126
|
+
.with_bindings(
|
1127
|
+
uri_method: :post,
|
1128
|
+
uri_template: "/v1/{parent}/workerPools",
|
1129
|
+
body: "worker_pool",
|
1130
|
+
matches: [
|
1131
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1132
|
+
]
|
1133
|
+
)
|
1134
|
+
transcoder.transcode request_pb
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
##
|
1138
|
+
# @private
|
1139
|
+
#
|
1140
|
+
# GRPC transcoding helper method for the get_worker_pool REST call
|
1141
|
+
#
|
1142
|
+
# @param request_pb [::Google::Cloud::Build::V1::GetWorkerPoolRequest]
|
1143
|
+
# A request object representing the call parameters. Required.
|
1144
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1145
|
+
# Uri, Body, Query string parameters
|
1146
|
+
def self.transcode_get_worker_pool_request request_pb
|
1147
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1148
|
+
.with_bindings(
|
1149
|
+
uri_method: :get,
|
1150
|
+
uri_template: "/v1/{name}",
|
1151
|
+
matches: [
|
1152
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false]
|
1153
|
+
]
|
1154
|
+
)
|
1155
|
+
transcoder.transcode request_pb
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
##
|
1159
|
+
# @private
|
1160
|
+
#
|
1161
|
+
# GRPC transcoding helper method for the delete_worker_pool REST call
|
1162
|
+
#
|
1163
|
+
# @param request_pb [::Google::Cloud::Build::V1::DeleteWorkerPoolRequest]
|
1164
|
+
# A request object representing the call parameters. Required.
|
1165
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1166
|
+
# Uri, Body, Query string parameters
|
1167
|
+
def self.transcode_delete_worker_pool_request request_pb
|
1168
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1169
|
+
.with_bindings(
|
1170
|
+
uri_method: :delete,
|
1171
|
+
uri_template: "/v1/{name}",
|
1172
|
+
matches: [
|
1173
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false]
|
1174
|
+
]
|
1175
|
+
)
|
1176
|
+
transcoder.transcode request_pb
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
##
|
1180
|
+
# @private
|
1181
|
+
#
|
1182
|
+
# GRPC transcoding helper method for the update_worker_pool REST call
|
1183
|
+
#
|
1184
|
+
# @param request_pb [::Google::Cloud::Build::V1::UpdateWorkerPoolRequest]
|
1185
|
+
# A request object representing the call parameters. Required.
|
1186
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1187
|
+
# Uri, Body, Query string parameters
|
1188
|
+
def self.transcode_update_worker_pool_request request_pb
|
1189
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1190
|
+
.with_bindings(
|
1191
|
+
uri_method: :patch,
|
1192
|
+
uri_template: "/v1/{worker_pool.name}",
|
1193
|
+
body: "worker_pool",
|
1194
|
+
matches: [
|
1195
|
+
["worker_pool.name", %r{^projects/[^/]+/locations/[^/]+/workerPools/[^/]+/?$}, false]
|
1196
|
+
]
|
1197
|
+
)
|
1198
|
+
transcoder.transcode request_pb
|
1199
|
+
end
|
1200
|
+
|
1201
|
+
##
|
1202
|
+
# @private
|
1203
|
+
#
|
1204
|
+
# GRPC transcoding helper method for the list_worker_pools REST call
|
1205
|
+
#
|
1206
|
+
# @param request_pb [::Google::Cloud::Build::V1::ListWorkerPoolsRequest]
|
1207
|
+
# A request object representing the call parameters. Required.
|
1208
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
1209
|
+
# Uri, Body, Query string parameters
|
1210
|
+
def self.transcode_list_worker_pools_request request_pb
|
1211
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1212
|
+
.with_bindings(
|
1213
|
+
uri_method: :get,
|
1214
|
+
uri_template: "/v1/{parent}/workerPools",
|
1215
|
+
matches: [
|
1216
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
1217
|
+
]
|
1218
|
+
)
|
1219
|
+
transcoder.transcode request_pb
|
1220
|
+
end
|
1221
|
+
end
|
1222
|
+
end
|
1223
|
+
end
|
1224
|
+
end
|
1225
|
+
end
|
1226
|
+
end
|
1227
|
+
end
|